Bitcoin Forum

Other => Meta => Topic started by: grue on March 26, 2015, 03:39:26 PM



Title: Signature Adblock Script [0.5.0]
Post by: grue on March 26, 2015, 03:39:26 PM
Signature advertisements have gotten more and more "creative" and annoying over the past few years. Unlike forum banner ads, they can't be hidden and can show up multiple times per page so they can significantly clutter up each topic. Blocking them with ABP is futile because the filters are limited to blocking a particular user's signature.

To address this problem, I have developed a script that detects "annoying" signatures and blocks them. It doesn't use a blacklist, but rather a scoring system for each signature. If the score exceeds a certain threshold, the signature is hidden. Preliminarily testing shows that most signature advertisements are blocked (exceptions are ads with little formatting).

Screenshot: (note how only the annoying ads in the first 3 signatures are blocked, but the tame signature at the bottom is untouched)
https://i.imgur.com/DFqT3Fd.png

Download (updated 2018-03-13; reason: changed host to github.com):
Userscript
SignatureAdblock.user.js (https://github.com/grue0/bitcointalk-scripts/raw/master/SignatureAdblock.user.js) (0.5.1)
Installation:
  • If you haven't already, install greasemonkey (firefox) (https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/), or tampermonkey (chrome) (https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo)
  • Download the script

Firefox extension
https://addons.mozilla.org/en-US/firefox/addon/bitcointalk-signature-adblock/
Works for mobile and desktop versions, but only recommended for mobile. Dekstop users should use the userscript.


Title: Re: Signature Adblock Script
Post by: cazkooo on March 26, 2015, 03:48:28 PM
Interesting, how do you score the signature? does it according to the post of that person made? tame signatures means a signature with less characters? doesnt this means lower rank signature like mine will be visible? there are tons of low rank that spam the most on forum


Title: Re: Signature Adblock Script
Post by: izanagi narukami on March 26, 2015, 04:03:59 PM
I just installed it and it works  :o

My current signature vanish but my upper post before ( using rollin.io member's signature ) still exist



Title: Re: Signature Adblock Script
Post by: Lauda on March 26, 2015, 04:19:48 PM
We've been asking for it, and we've received it. Even though this might not be the permanent solution that we've been looking for, it's a great temporary one. Great work grue.
However, was there not a option to disable all signatures?


Title: Re: Signature Adblock Script
Post by: Mitchell on March 26, 2015, 04:25:15 PM
We've been asking for it, and we've received it. Even though this might not be the permanent solution that we've been looking for, it's a great temporary one. Great work grue.
However, was there not a option to disable all signatures?
Yes there is, but, that's would disable all signatures and there are more than enough people who don't want that, including me. I want to see signatures, just not the annoying flashy ones. ;D


Title: Re: Signature Adblock Script
Post by: kcud_dab on March 26, 2015, 04:34:24 PM
However, was there not a option to disable all signatures?
Even If I'm sure you already know this:
"Profile" -> "Look and Layout Preferences" -> "Don't show users' signatures."


Title: Re: Signature Adblock Script
Post by: grue on March 26, 2015, 04:36:12 PM
Interesting, how do you score the signature? does it according to the post of that person made? tame signatures means a signature with less characters? doesnt this means lower rank signature like mine will be visible? there are tons of low rank that spam the most on forum
The scoring system is composed of two parts: a formatting score, and a character annoyingness score. Formatting score is calculated based on the amount of area that uses annoying formatting. Different types of formatting increases the score at different rates. So using bold text will increase the score less than using glow. A signature that uses no formatting will always have a formatting score of 0. Character annoyingness score is calculated from the occurrences of certain characters (ie. ▓).

I just installed it and it works  :o

My current signature vanish but my upper post before ( using rollin.io member's signature ) still exist
In the future I might add additional character analysis to catch ascii art that doesn't use formatting.


Title: Re: Signature Adblock Script
Post by: ndnh on March 26, 2015, 04:39:09 PM
However, was there not a option to disable all signatures?
Even If I'm sure you already know this :
"Profile" -> "Look and Layout Preferences" -> "Don't show users' signatures."

Another option is to install adblock and simply right click -> Adblock -> Block this ad.

Edit: Tried to block 1 signature... It blocked everything!

http://i.gyazo.com/bdecc843a067b4481c5b4dbc4d58631a.png

Edit2: Okay, the profile one is better..


Title: Re: Signature Adblock Script
Post by: kcud_dab on March 26, 2015, 04:53:44 PM
Sure, if you don't know what your are doing and ignoring all "span" tags on the forum you won't be able to see many things...
Anyway if you really want to use AdBlock try to ignore "div" tags with "signature" class (don't ask me how, I don't use this software), but there isn't any advantages of using adblock to ignore signatures here over the option made for this in your profile settings unless you want to waste some cpu cycles and use more memory.


Title: Re: Signature Adblock Script
Post by: Lauda on March 26, 2015, 05:09:54 PM
We've been asking for it, and we've received it. Even though this might not be the permanent solution that we've been looking for, it's a great temporary one. Great work grue.
However, was there not a option to disable all signatures?
Yes there is, but, that's would disable all signatures and there are more than enough people who don't want that, including me. I want to see signatures, just not the annoying flashy ones. ;D
Ah yes, I wasn't even sure that the feature was there. I guess it must have slipped my mind. Indeed there are some signatures that have provided useful links to me in the past. Removing all of them isn't something that I'd want either.

Even If I'm sure you already know this:
"Profile" -> "Look and Layout Preferences" -> "Don't show users' signatures."
Yeah, I was just making sure.


Title: Re: Signature Adblock Script
Post by: cakir on March 26, 2015, 05:39:20 PM
I don't trust your js code.
It's non human readable.

Share original source code.


Title: Re: Signature Adblock Script
Post by: Hazir on March 26, 2015, 05:45:41 PM
I won't install it and I do not want any signature blocked because I feel that I will lose some insight with them blocked. But it is a great option for all signature campaign haters, they will have an ad free forum... But I guess they will be still complaining...


Title: Re: Signature Adblock Script
Post by: kcud_dab on March 26, 2015, 05:46:08 PM
I don't trust your js code.
It's non human readable.

Share original source code.
Non humain readable ?

Code:
// ==UserScript==
// @name        bitcointalk adblock
// @namespace   grue
// @include     https://bitcointalk.org/index.php?topic=*
// @require     http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.3.min.js
// @grant       none
// @version     0.2.0
// @downloadURL https://bitcointalk.blob.core.windows.net/scripts/bct_adblock.user.js
// @updateURL   https://bitcointalk.blob.core.windows.net/scripts/bct_adblock.meta.js
// ==/UserScript==
function e(e) {
    for (var t = e.charCodeAt(), r = [
            [9472, 9583],
            [9600, 9631],
            [9632, 9727]
        ], n = 0; n < r.length; n++)
        if (t > r[n][0] && t <= r[n][1]) return !0;
    return !1
}

function t(r) {
    var n = Array.prototype.slice.call(r.childNodes),
        o = n.reduce(function(r, n) {
            if ($(n).attr("skip")) return r;
            if (1 == n.nodeType) return r + t(n);
            if (3 == n.nodeType) {
                var o = 0;
                for (c of n.nodeValue) e(c) && o++;
                var i = Number(getComputedStyle(n.parentNode).fontSize.match(/(\d*(\.\d*)?)px/)[1]);
                return r + i * i * o
            }
            return r
        }, 0);
    return o
}

function r(e) {
    var t = 0;
    return e.backgroundcolor ? 1 : (e.fontsize >= 14 && (t += .05 + Math.max(0, .02 * (e.fontsize - 14))), e.color && (t += .2), e.font && (t += .03), e.underline && (t += .05), e.bold && (t += .05), e.table && (t += .2), Math.min(t, 1))
}

function n(e, t) {
    var o = t;
    "undefined" == typeof t ? o = t = {} : t = $.extend({}, t);
    var i = Array.prototype.slice.call(e.childNodes);
    e.style["font-size"] && "inherit" != e.style["font-size"] && (t.fontsize = Number(e.style["font-size"].match(/(\d+)pt/)[1])), e.style.color && "inherit" != e.style.color && (t.color = !0), e.style["background-color"] && "inherit" != e.style["background-color"] && (t.backgroundcolor = !0), e.style["font-family"] && "inherit" != e.style["font-family"] && (t.font = !0), -1 != e.style["text-decoration"].indexOf("underline") && (t.underline = !0), "B" == e.tagName && (t.bold = !0), "TABLE" == e.tagName && (t.table = !0);
    var a = $(e).width() * $(e).height() * r(t) - $(e).width() * $(e).height() * r(o);
    return a += i.reduce(function(e, r) {
        return 1 == r.nodeType ? e + n(r, t) : e
    }, 0)
}

function o(e) {
    var r = 0;
    return r += t(e), r += n(e), r = Math.sqrt(r), $(e).find("a").length && (r *= 2), r > 100
}
for (var i = $("div .signature"), a = 0; a < i.length; a++) o(i[a]) && $(i[a]).attr("style", "opacity: 0; pointer-events: none");
If you cannot read this, original source code wont change anything!


Title: Re: Signature Adblock Script
Post by: redsn0w on March 26, 2015, 05:49:31 PM
I won't install it and I do not want any signature blocked because I feel that I will lose some insight with them blocked. But it is a great option for all signature campaign haters, they will have an ad free forum... But I guess they will be still complaining...

Yes of course, you are right. They will complain again and again for the post itself (I think everyone should participate to the forum activity, but he should add a constructive concept to the thread). However thanks for the script @grue, I will 'install' and execute it when I will return to my home.


Maybe this script may be integrated to the forum without the use of an addon or extension, what do you think?


Title: Re: Signature Adblock Script
Post by: arallmuus on March 26, 2015, 06:11:11 PM
The scoring system is composed of two parts: a formatting score, and a character annoyingness score. Formatting score is calculated based on the amount of area that uses annoying formatting. Different types of formatting increases the score at different rates. So using bold text will increase the score less than using glow. A signature that uses no formatting will always have a formatting score of 0. Character annoyingness score is calculated from the occurrences of certain characters (ie. ▓).

Does this means that Higher rank signature will be block completely and lower rank signature will still be visible? Mind if I am asking how is this different from the options on our profile to completely block the signatures from other user?


Title: Re: Signature Adblock Script
Post by: Mitchell on March 26, 2015, 06:14:05 PM
Does this means that Higher rank signature will be block completely and lower rank signature will still be visible? Mind if I am asking how is this different from the options on our profile to completely block the signatures from other user?
Read the thread and you would have known that both of your questions have already been answered. Yes, you could block all signatures, but that isn't always what you want. And yes, low formatted signatures will still show.

We've been asking for it, and we've received it. Even though this might not be the permanent solution that we've been looking for, it's a great temporary one. Great work grue.
However, was there not a option to disable all signatures?
Yes there is, but, that's would disable all signatures and there are more than enough people who don't want that, including me. I want to see signatures, just not the annoying flashy ones. ;D


Title: Re: Signature Adblock Script
Post by: arallmuus on March 26, 2015, 06:25:41 PM
Does this means that Higher rank signature will be block completely and lower rank signature will still be visible? Mind if I am asking how is this different from the options on our profile to completely block the signatures from other user?
Read the thread and you would have known that both of your questions have already been answered. Yes, you could block all signatures, but that isn't always what you want. And yes, low formatted signatures will still show.


Not really since i stumbled to read upon this

In the future I might add additional character analysis to catch ascii art that doesn't use formatting.

it seems like grue will upgrade it to block lower rank signatures as well, perhaps in the end signature that will show up is only a simple plain text if we use this addons


Title: Re: Signature Adblock Script
Post by: Hazir on March 26, 2015, 06:32:09 PM
I feel like we are treading on thin ice here. Our forum is so unique and we created system of direct advertising method that is unprecedented and  truly "sui generis". Yet you want to destroy that system by creating tools and methods which will disable signatures permanently? Potentially it can bring an end to all signature campaigns.


Title: Re: Signature Adblock Script
Post by: EcuaMobi on March 26, 2015, 07:29:31 PM
I feel like we are treading on thin ice here. Our forum is so unique and we created system of direct advertising method that is unprecedented and  truly "sui generis". Yet you want to destroy that system by creating tools and methods which will disable signatures permanently? Potentially it can bring an end to all signature campaigns.

It's true that signature ads are a unique advertising method, but if people abuse it then the overall experience of this forum -which is the face of bitcoin- will decrease significantly. Damaging the quality of the forum is much worse than potentially decreasing the earnings produced by this advertising method.

Thank you grue, I've installed the script and it's working great. As said this is a great temporal solution. However we still need to find a way to prevent signature campaigns from reducing the quality of the posts so much. Personally that bothers me much more than actually seeing the ads.


Title: Re: Signature Adblock Script
Post by: SaltySpitoon on March 26, 2015, 08:01:34 PM
I feel like we are treading on thin ice here. Our forum is so unique and we created system of direct advertising method that is unprecedented and  truly "sui generis". Yet you want to destroy that system by creating tools and methods which will disable signatures permanently? Potentially it can bring an end to all signature campaigns.

The forum isn't about advertising, its about discussion. Businesses that advertise in people's signatures have the same right to be here and the same right to be kicked out if they are disruptive. If individuals want to opt out of seeing advertisements they are more than welcome to, and if that brings down paid advertising signatures, then so be it.

But I agree, great job grue.


Title: Re: Signature Adblock Script
Post by: pozmu on March 26, 2015, 08:04:14 PM
We've been asking for it, and we've received it. Even though this might not be the permanent solution that we've been looking for, it's a great temporary one. Great work grue.
However, was there not a option to disable all signatures?

Lol, what?
You have one of the blocked signature yourself...


Title: Re: Signature Adblock Script
Post by: Lauda on March 26, 2015, 08:13:25 PM
Lol, what?
You have one of the blocked signature yourself...
Ignoring hundreds of users is inefficient. There are too many spammers. I've disabled all signatures long ago anyways.
This is something that I've needed. This might be a bit controversial, but it hurts my eyes a bit.


Title: Re: Signature Adblock Script
Post by: grue on March 26, 2015, 10:34:41 PM
I don't trust your js code.
It's non human readable.

Share original source code.
As with most javascript distributed over the internet, the script is minified to save bandwidth. It also has the benefit of removing all my debugging code. The only change from the original is the removal of dead code and renaming of variables.


Title: Re: Signature Adblock Script
Post by: dserrano5 on March 26, 2015, 10:47:47 PM
I get:

Code:
e.style['text-decoration'] is undefined

and of course zero results :P. This is Debian stable's "Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.5.3".


Title: Re: Signature Adblock Script
Post by: grue on March 27, 2015, 04:31:18 AM
I get:

Code:
e.style['text-decoration'] is undefined

and of course zero results :P. This is Debian stable's "Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.5.3".
try
https://grue.blob.core.windows.net/scripts/bct_adblock.user.js?sv=2014-02-14&si=1&sr=c&sig=k%2BqstGBI3oQ8TrHfPWjS5HgjrazuDPmKJ6rYNs7rvRk%3D


Title: Re: Signature Adblock Script
Post by: alani123 on March 27, 2015, 04:33:32 AM
Funny how a this is created by a mod. I'd be interested to see if there are any after effects if it gets popular.

I wouldn't install it though, I don't see signatures as spam besides some very specific exceptions.


Title: Re: Signature Adblock Script
Post by: BadBear on March 27, 2015, 05:49:05 AM
Funny how a this is created by a mod. I'd be interested to see if there are any after effects if it gets popular.

I wouldn't install it though, I don't see signatures as spam besides some very specific exceptions.

Not really, it's basically this (https://bitcointalk.org/index.php?topic=985516.0), which both theymos and I think is needed, except not integrated into the forum. Basically an ignore feature for signatures, possibly including auto ignore at a certain point. It's not a solution to sig spam, but as part of a larger effort it will help long term.


Title: Re: Signature Adblock Script
Post by: alani123 on March 27, 2015, 07:05:34 AM
Funny how a this is created by a mod. I'd be interested to see if there are any after effects if it gets popular.

I wouldn't install it though, I don't see signatures as spam besides some very specific exceptions.

Not really, it's basically this (https://bitcointalk.org/index.php?topic=985516.0), which both theymos and I think is needed, except not integrated into the forum. Basically an ignore feature for signatures, possibly including auto ignore at a certain point. It's not a solution to sig spam, but as part of a larger effort it will help long term.

Is this larger effort going to give us an option to hide signatures on a user by user basis from inside the forum? I'm sure that if people were able to do this without having to download a script it would be more effective.


Title: Re: Signature Adblock Script
Post by: BadBear on March 27, 2015, 09:04:18 AM
That's what the thread I linked to was about, yes, forum supported signature ignores.  In addition to ignoring any specific user signature, it should also automatically ignore all similar signatures across all users (ie sig campaign ads). Theymos also mentioned an auto ignore at a certain threshold, which would be useful.


Title: Re: Signature Adblock Script
Post by: coinpr0n on March 27, 2015, 09:42:19 AM
It's a good option to have and I like that gentle signatures are still kept. Might try it out some day but I'm OK with the signatures right now.


Title: Re: Signature Adblock Script
Post by: Jeremycoin on March 27, 2015, 03:30:11 PM
I think we don't need to do that
Although I don't like annoying ads
But, ads is one of the ways to earn BTCitcoin here


Title: Re: Signature Adblock Script
Post by: Welsh on March 27, 2015, 05:44:16 PM
I had a temporary solution myself which to be honest was a bit of a DIY job. This is much better and will be using from now on. Hopefully Badbears suggestion will become a reality in the new forum software. Until then this will suffice. Cheers grue!


Title: Re: Signature Adblock Script
Post by: PolarPoint on March 27, 2015, 06:11:39 PM
This solution is great. Helps our eyes, but doesn't stop spam.  :-\

If this is going to be updated regularly, would it be more efficient to add specific keywords like "bitmixer" and "bit-x"?


Title: Re: Signature Adblock Script
Post by: Snorek on March 27, 2015, 07:02:25 PM
This solution is great. Helps our eyes, but doesn't stop spam.  :-\

If this is going to be updated regularly, would it be more efficient to add specific keywords like "bitmixer" and "bit-x"?


OMG! It is so easy. Why nobody thought about this before? This is ALL we need, signature block with ability just to react to specific words, user would be able to create specific filters only for the most obnoxious signatures! Can you do this?


Title: Re: Signature Adblock Script
Post by: dserrano5 on March 27, 2015, 11:52:05 PM
Code:
e.style['text-decoration'] is undefined
try
https://grue.blob.core.windows.net/scripts/bct_adblock.user.js?sv=2014-02-14&si=1&sr=c&sig=k%2BqstGBI3oQ8TrHfPWjS5HgjrazuDPmKJ6rYNs7rvRk%3D

Cheers! All hail grue! \o/


Title: Re: Signature Adblock Script
Post by: DonQuijote on March 27, 2015, 11:54:13 PM
Good trick, thanks!


Title: Re: Signature Adblock Script
Post by: grue on March 28, 2015, 12:02:53 AM
The script has been updated to 0.3.0. It includes the fix for the bug  (https://bitcointalk.org/index.php?topic=1003570.msg10897126#msg10897126)that dserrano5 pointed out. I've also changed the storage account of the script to bitcointalk to grue (I recently found out that I controlled that account :p). More importantly, the change of of storage account allowed me to use a SAS url for the script, which has the benefit of not working if the owner of the account changes. That way if my azure account expires, another malicious party can't take control of the domain and push rogue updates.


Title: Re: Signature Adblock Script [0.3.0]
Post by: R2D221 on March 28, 2015, 01:31:22 AM
This is awesome. Too bad I can't use it on my mobile :(


Title: Re: Signature Adblock Script [0.3.0]
Post by: Mitchell on March 28, 2015, 09:31:21 AM
Thanks for the update Grue! ;D


Title: Re: Signature Adblock Script [0.3.0]
Post by: s1ng on March 28, 2015, 09:52:59 AM
This is awesome. Too bad I can't use it on my mobile :(

I though it can work to mobile too since I'm still not try it

Thanks for a new update..everything works perfect


Title: Re: Signature Adblock Script [0.3.0]
Post by: R2D221 on March 28, 2015, 02:18:54 PM
This is awesome. Too bad I can't use it on my mobile :(

I though it can work to mobile too since I'm still not try it

Thanks for a new update..everything works perfect

It can't work on Windows Phone because it doesn't have addons.


Title: Re: Signature Adblock Script [0.3.0]
Post by: grue on March 28, 2015, 04:08:31 PM
You can theoretically get it to work by using a proxy that inserts the javascript into every page that you load. I'm planning on implementing a bitcointalk proxy with 2-factor authentication and other security features, so there's that  :)


Title: Re: Signature Adblock Script [0.3.0]
Post by: Mitchell on March 28, 2015, 04:26:27 PM
You can theoretically get it to work by using a proxy that inserts the javascript into every page that you load. I'm planning on implementing a bitcointalk proxy with 2-factor authentication and other security features, so there's that  :)
Sign me up! That is extremely handy.


Title: Re: Signature Adblock Script [0.3.0]
Post by: R2D221 on March 28, 2015, 04:31:22 PM
You can theoretically get it to work by using a proxy that inserts the javascript into every page that you load. I'm planning on implementing a bitcointalk proxy with 2-factor authentication and other security features, so there's that  :)

Yes, that would be nice, as long as it's secure.


Title: Re: Signature Adblock Script [0.3.0]
Post by: PolarPoint on April 07, 2015, 12:34:15 AM
Please block this. This the worst sig ever.
https://bitcointalk.org/index.php?topic=1013170.0


Title: Re: Signature Adblock Script [0.3.0]
Post by: master-P on April 07, 2015, 12:44:40 AM
Neat tool, nice to have. Personally I never really minded the sig ads that much. I am more bothered by the low quality/irrelevant/spammy posts that the sig ads/campaigns unintentionally promote to these forums.


Title: Re: Signature Adblock Script [0.3.0]
Post by: Hueristic on April 07, 2015, 03:07:32 AM
Neat tool, nice to have. Personally I never really minded the sig ads that much. I am more bothered by the low quality/irrelevant/spammy posts that the sig ads/campaigns unintentionally promote to these forums.

When I decide whether to ignore someone the Sig can be the deciding factor.


Title: Re: Signature Adblock Script
Post by: sed on April 07, 2015, 05:58:34 AM
I don't trust your js code.
It's non human readable.

Share original source code.

Uh, there's no such thing as compiled javascript (I know someone will correct me if I'm wrong), so I have to wonder what the hell you're talking about here.


I feel like we are treading on thin ice here. Our forum is so unique and we created system of direct advertising method that is unprecedented and  truly "sui generis". Yet you want to destroy that system by creating tools and methods which will disable signatures permanently? Potentially it can bring an end to all signature campaigns.

The forum isn't about advertising, its about discussion. Businesses that advertise in people's signatures have the same right to be here and the same right to be kicked out if they are disruptive. If individuals want to opt out of seeing advertisements they are more than welcome to, and if that brings down paid advertising signatures, then so be it.

But I agree, great job grue.

Indeed, I appreciate the approach here, people taking control to limit what they want to see, obviously this is a win.  If advertizers annoy, they should be punished by people ignoring them.  That will teach them to annoy less.  Ie, be less distracting.

Wil I be shot for irony if I try this script myself?


Title: Re: Signature Adblock Script [0.3.0]
Post by: redsn0w on April 07, 2015, 08:50:41 AM
Can I ask if there will be the possibility to integrate that script here in this forum (without using an external extension)? Thanks for the attention.


Title: Re: Signature Adblock Script [0.3.0]
Post by: grue on April 07, 2015, 04:37:34 PM
Can I ask if there will be the possibility to integrate that script here in this forum (without using an external extension)? Thanks for the attention.
One way would be to create a forum theme that contains my script. That way it's available to every user and can be enabled/disabled from the user control panel. You'll have to petition theymos to do that though.

Another way (which I mentioned before), would be to use a proxy that injects the script.


Title: Re: Signature Adblock Script
Post by: dserrano5 on April 07, 2015, 08:49:14 PM
I don't trust your js code.
It's non human readable.

Share original source code.

Uh, there's no such thing as compiled javascript (I know someone will correct me if I'm wrong), so I have to wonder what the hell you're talking about here.+

Not compiled but minified, which makes it harder to follow. He's asking for the non-minified version.


Title: Re: Signature Adblock Script [0.3.0]
Post by: TheRealSteve on April 08, 2015, 03:19:54 AM
If you cannot read this, original source code wont change anything!
That's a wee bit unfair - Just because somebody doesn't know what to make of...
Code:
$(e).find("a").length && (r *= 2)
...doesn't mean they won't know what this does:
Code:
if ($(element).find("a").length > 0) { score = score * 2 }
And the minified code - though possibly even the input - makes use of quite a few such tricks and programmer shorthands.
refactored+annotated (making no claim that it still works, or even that I got it right - I certainly wouldn't use it): http://pastebin.com/CTXaCnkp

But for most people with concerns, this is the only bit of code that does anything they should care about:
Code:
$(i[a]).attr("style", "opacity: 0; pointer-events: none")
All it does is make the entire signature fully transparent and unresponsive to clicks/taps, and that bit of code is only called if the signature scores badly.  There's certainly no communication with a mothership or secret background bitcoin mining on your CPU etc. going on. (as of this post)


Title: Re: Signature Adblock Script [0.3.0]
Post by: grue on April 08, 2015, 04:44:28 AM
If you cannot read this, original source code wont change anything!
That's a wee bit unfair - Just because somebody doesn't know what to make of...
Code:
$(e).find("a").length && (r *= 2)
...doesn't mean they won't know what this does:
Code:
if ($(element).find("a").length > 0) { score = score * 2 }
And the minified code - though possibly even the input - makes use of quite a few such tricks and programmer shorthands.
refactored+annotated (making no claim that it still works, or even that I got it right - I certainly wouldn't use it): http://pastebin.com/CTXaCnkp

But for most people with concerns, this is the only bit of code that does anything they should care about:
Code:
$(i[a]).attr("style", "opacity: 0; pointer-events: none")
All it does is make the entire signature fully transparent and unresponsive to clicks/taps, and that bit of code is only called if the signature scores badly.  There's certainly no communication with a mothership or secret background bitcoin mining on your CPU etc. going on. (as of this post)

Your annotated code is actually pretty close to the original source! The main reason I use mimify the script with uglifyjs is because it removes my debug statements, which there are a lot of. In the interest of openness, here is a version that has minimal uglification applied to it: bct_adblock.no_debug.js (https://grue.blob.core.windows.net/scripts/bct_adblock.no_debug.js?sv=2014-02-14&si=1&sr=c&sig=k%2BqstGBI3oQ8TrHfPWjS5HgjrazuDPmKJ6rYNs7rvRk%3D). The creation and upload of the not-so-minified version is built into my upload scripts so it should be up to date with any future updates.

For reference, below is the original source, with debugging removed. If you want to understand how the script works, TheRealSteve is the way to go because it has annotations.
Code:
function isAnnoyingCharacter(char)
{
  var code = char.charCodeAt();
  var ranges = [[0x2500, 0x256F],
                [0x2580, 0x259F],
                [0x25A0, 0x25FF],
               ];
  for(var i = 0; i < ranges.length; i++)
    if(code > ranges[i][0] && code <= ranges[i][1])
      return true;
  return false;
}

function calculateAnnoyingCharacter(element)
{
  var childNodes = Array.prototype.slice.call(element.childNodes);
  var result = childNodes.reduce(
    function(prev, current, index)
    {
      if(current.nodeType == 1)
        return prev + calculateAnnoyingCharacter(current);
      if(current.nodeType == 3)
      {
        var count = 0;
        for (c of current.nodeValue)
          if(isAnnoyingCharacter(c))
            count++;

        var size = Number(getComputedStyle(current.parentNode).fontSize.match(/(\d*(\.\d*)?)px/)[1]);
        return prev + size*size*count;
      }
      return prev;
    }, 0);
  return result;
}

function getFormattingRate(context)
{
  var result = 0;
  if(context.backgroundColor)
    return 1;
  if(context.fontSize >= 14)
    result += 0.05 + Math.max(0, (context.fontsize - 14)*0.03);
  if(context.color)
    result += 0.2;
  if(context.font)
    result += 0.03;
  if(context.underline)
    result += 0.02;
  if(context.bold)
    result += 0.04;
  if(context.table)
    result += 0.2;
  return Math.min(result, 1);
}


function calculateFormattingScore(element, context)
{
  var previousContext = context;
  if(typeof(context) === 'undefined')
    previousContext = context = {};
  else
    context = $.extend({}, context);

  if(element.style.fontSize && element.style.fontSize != "inherit")
    context.fontsize = Number(element.style.fontSize.match(/(\d+)pt/)[1]);

  if(element.style.color && element.style.color != "inherit")
    context.color = true;
  
  if(element.style.backgroundColor && element.style.backgroundColor != "inherit")
    context.backgroundColor = true;
  
  if(element.style.fontFamily && element.style.fontFamily != "inherit")
    context.font = true;
  
  if(element.style.textDecoration.indexOf("underline") != -1)
    context.underline = true;
  
  if(element.tagName == "B")
    context.bold = true;
  
  if(element.tagName == "TABLE")
    context.table = true;
  
  var score = $(element).width() * $(element).height() * getFormattingRate(context)
              - $(element).width() * $(element).height() * getFormattingRate(previousContext);

  var childNodes = Array.prototype.slice.call(element.childNodes);
  score += childNodes.reduce(
    function(prev, current, index)
    {
      if(current.nodeType == 1)
        return prev + calculateFormattingScore(current, context);
      return prev;
    }, 0);
  return score;
}

function isAd(div)
{
  var score = 0;
  score += calculateAnnoyingCharacter(div);
  score += calculateFormattingScore(div);
  score = Math.sqrt(score);
  if($(div).find("a").length)
    score *= 2;
  
  return score > 100;
};

try
{
  var signatures = $("div .signature");
  for(var i = 0; i < signatures.length; i++)
  {
    if(isAd(signatures[i]))
    {
        $(signatures[i]).attr("style", "opacity: 0; pointer-events: none");
    }
  }
}
catch(e)
{
  console.log(e);
}


Title: Re: Signature Adblock Script [0.3.0]
Post by: Amph on April 08, 2015, 07:53:29 AM
too bad i don't like java, why not choosing other programming language? can this be done in php or python?


Title: Re: Signature Adblock Script [0.3.0]
Post by: Mitchell on April 08, 2015, 08:02:14 AM
too bad i don't like java, why not choosing other programming language? can this be done in php or python?
This is not Java, this is Javascript.


Title: Re: Signature Adblock Script [0.3.0]
Post by: coinpr0n on April 08, 2015, 09:09:36 AM
too bad i don't like java, why not choosing other programming language? can this be done in php or python?
This is not Java, this is Javascript.

Either way, choose the best tool for the job. I know it's not, but even if it were Java, not "liking" something shouldn't be the disqualifying feature when it comes to choosing a development technology.


Title: Re: Signature Adblock Script [0.3.0]
Post by: redsn0w on April 08, 2015, 09:32:32 AM
Can I ask if there will be the possibility to integrate that script here in this forum (without using an external extension)? Thanks for the attention.
One way would be to create a forum theme that contains my script. That way it's available to every user and can be enabled/disabled from the user control panel. You'll have to petition theymos to do that though.

Another way (which I mentioned before), would be to use a proxy that injects the script.

Thanks for the reply, so we should open a thread and ask to theymos if he can add this script here in the forum. I think someone of us will do this (when it will be necessary). The second option is more "risky" than the first, or am I wrong? Maybe it is better the first option.


Title: Re: Signature Adblock Script [0.3.0]
Post by: TheRealSteve on April 08, 2015, 10:28:49 AM
Your annotated code is actually pretty close to the original source!
sweet! :)

Thanks for the reply, so we should open a thread and ask to theymos if he can add this script here in the forum.
Keep in mind that if the javascript code is added to the forum, it also needs somebody to maintain it, and you can't make your own tweaks (e.g. to the scoring algorithm)

I'm also not sure that's really the way to go versus a signature ignore boolean of some variety.  There's pros and cons (dev time, upkeep, (false) positives, user control, server load, etc.) to both approaches though.


Title: Re: Signature Adblock Script
Post by: SirChiko on April 08, 2015, 11:13:31 AM
However, was there not a option to disable all signatures?
Even If I'm sure you already know this:
"Profile" -> "Look and Layout Preferences" -> "Don't show users' signatures."
That isn't thr thing everyone wants. Me as an example, i want to see user signatures and most of other people want too, they just don't want to see the AD ones.


Title: Re: Signature Adblock Script [0.3.0]
Post by: Hueristic on April 09, 2015, 04:06:57 AM

One way would be to create a forum theme that contains my script. That way it's available to every user and can be enabled/disabled from the user control panel. You'll have to petition theymos to do that though.


If this was implemented then selective blocking could be used as well.


Title: Re: Signature Adblock Script [0.3.0]
Post by: EcuaMobi on April 20, 2015, 10:28:23 PM
One suggestion: Could you include "action=pm*" besides "topic=*" on the next version of the script? Removing the annoying signatures from private messages too would be great :)


Title: Re: Signature Adblock Script [0.3.0]
Post by: dserrano5 on May 05, 2015, 05:32:16 PM
This post (https://bitcointalk.org/index.php?topic=94488.msg11283129#msg11283129) has a non transparent signature, while this one (https://bitcointalk.org/index.php?topic=419432.msg11283290#msg11283290), by the same user, hasn't. There must be something in the first page that isn't there in the second. My firefox says:

Code:
TypeError: element.style.fontSize.match(...) is null
Stack trace:
calculateFormattingScore@file:///.../bct_adblock2.user.js:76:5
calculateFormattingScore/score<@file:///.../bct_adblock2.user.js:104:9
calculateFormattingScore@file:///.../bct_adblock2.user.js:106:1
isAd@file:///.../bct_adblock2.user.js:113:3
@file:///.../bct_adblock2.user.js:125:1

I'm using the readable code from #53 (https://bitcointalk.org/index.php?topic=1003570.msg11016703#msg11016703).


Title: Re: Signature Adblock Script [0.3.0]
Post by: bittyfree on May 06, 2015, 04:31:05 AM
Actually, there is a feature in the forum where you cam disable it. So the tool would be useless...
Goto Profile- Look and Layout Preferences - Dont show users signatures ;)


Title: Re: Signature Adblock Script [0.3.0]
Post by: R2D221 on May 06, 2015, 06:00:51 AM
Actually, there is a feature in the forum where you cam disable it. So the tool would be useless...
Goto Profile- Look and Layout Preferences - Dont show users signatures ;)

I do want to see signatures. What I don't want to see is signature campaigns.


Title: Re: Signature Adblock Script [0.3.0]
Post by: GannickusX on May 06, 2015, 01:17:38 PM
Actually, there is a feature in the forum where you cam disable it. So the tool would be useless...
Goto Profile- Look and Layout Preferences - Dont show users signatures ;)

I do want to see signatures. What I don't want to see is signature campaigns.

Then you need the  signature campaign blocker (Blocks every user that is participating or willing to participate in a signature campaign)



Title: Re: Signature Adblock Script [0.3.0]
Post by: R2D221 on May 06, 2015, 01:28:42 PM
Actually, there is a feature in the forum where you cam disable it. So the tool would be useless...
Goto Profile- Look and Layout Preferences - Dont show users signatures ;)

I do want to see signatures. What I don't want to see is signature campaigns.

Then you need the  signature campaign blocker (Blocks every user that is participating or willing to participate in a signature campaign)



And the difference between that and the software listed here is...?


Title: Re: Signature Adblock Script [0.3.0]
Post by: shorena on May 06, 2015, 04:07:57 PM
Actually, there is a feature in the forum where you cam disable it. So the tool would be useless...
Goto Profile- Look and Layout Preferences - Dont show users signatures ;)

I do want to see signatures. What I don't want to see is signature campaigns.

Then you need the  signature campaign blocker (Blocks every user that is participating or willing to participate in a signature campaign)



And the difference between that and the software listed here is...?

Its an incredible piece of software that can distinguish between those that are willing to participate and those who dont. You dont even have to actually wear a paid signature. It just knows. It uses cutting edge AI technology to achieve this and has nothing to do with the fantastic work grue has done here.

Can we stop feeding the trolls now?


Title: Re: Signature Adblock Script [0.3.0]
Post by: Quickseller on May 06, 2015, 04:47:44 PM
Actually, there is a feature in the forum where you cam disable it. So the tool would be useless...
Goto Profile- Look and Layout Preferences - Dont show users signatures ;)

I do want to see signatures. What I don't want to see is signature campaigns.

Then you need the  signature campaign blocker (Blocks every user that is participating or willing to participate in a signature campaign)



And the difference between that and the software listed here is...?

Its an incredible piece of software that can distinguish between those that are willing to participate and those who dont. You dont even have to actually wear a paid signature. It just knows. It uses cutting edge AI technology to achieve this and has nothing to do with the fantastic work grue has done here.

Can we stop feeding the trolls now?
This ad blocker probably actually does a pretty good job at identifying who is participating in paid signatures, especially when it comes to higher ranked users. If someone who really doesn't want to read any posts made by anyone wearing a paid signature (despite how much effort are put into their posts or how good their posts are) could slightly modify the code to hide any posts (instead of just the signature) of anyone wearing a paid signature.

If they really, really wanted to exclude anyone's posts who would even consider wearing a paid signature then you could do the above plus add a blockchain parser/analyzer that can find the likely alts of anyone wearing a paid signature and ignore those posts as well.


Title: Re: Signature Adblock Script [0.3.0]
Post by: Astargath on May 06, 2015, 05:32:59 PM
Actually, there is a feature in the forum where you cam disable it. So the tool would be useless...
Goto Profile- Look and Layout Preferences - Dont show users signatures ;)

I do want to see signatures. What I don't want to see is signature campaigns.

Then you need the  signature campaign blocker (Blocks every user that is participating or willing to participate in a signature campaign)



And the difference between that and the software listed here is...?

Its an incredible piece of software that can distinguish between those that are willing to participate and those who dont. You dont even have to actually wear a paid signature. It just knows. It uses cutting edge AI technology to achieve this and has nothing to do with the fantastic work grue has done here.

Can we stop feeding the trolls now?
This ad blocker probably actually does a pretty good job at identifying who is participating in paid signatures, especially when it comes to higher ranked users. If someone who really doesn't want to read any posts made by anyone wearing a paid signature (despite how much effort are put into their posts or how good their posts are) could slightly modify the code to hide any posts (instead of just the signature) of anyone wearing a paid signature.

If they really, really wanted to exclude anyone's posts who would even consider wearing a paid signature then you could do the above plus add a blockchain parser/analyzer that can find the likely alts of anyone wearing a paid signature and ignore those posts as well.

I mean isnt that what people really is pissed about? The actual posts from people participating in signature campaings and not the signature itself. Because im fairly sure no one really cares seeing the signatures, i honestly dont care but of course the problem would be that if you block everyone that has a signature then you would block valuable members who do post useful stuff


Title: Re: Signature Adblock Script [0.3.0]
Post by: grue on May 06, 2015, 10:43:34 PM
New version: https://bitcointalk.blob.core.windows.net/scripts/bct_adblock.user.js

One suggestion: Could you include "action=pm*" besides "topic=*" on the next version of the script? Removing the annoying signatures from private messages too would be great :)

added

This post (https://bitcointalk.org/index.php?topic=94488.msg11283129#msg11283129) has a non transparent signature, while this one (https://bitcointalk.org/index.php?topic=419432.msg11283290#msg11283290), by the same user, hasn't. There must be something in the first page that isn't there in the second. My firefox says:

Code:
TypeError: element.style.fontSize.match(...) is null
Stack trace:
calculateFormattingScore@file:///.../bct_adblock2.user.js:76:5
calculateFormattingScore/score<@file:///.../bct_adblock2.user.js:104:9
calculateFormattingScore@file:///.../bct_adblock2.user.js:106:1
isAd@file:///.../bct_adblock2.user.js:113:3
@file:///.../bct_adblock2.user.js:125:1

I'm using the readable code from #53 (https://bitcointalk.org/index.php?topic=1003570.msg11016703#msg11016703).
fixed. It was caused by font-size that weren't in pt (didn't know that was possible in smf). I also added support for html font sizes.


Title: Re: Signature Adblock Script [0.3.0]
Post by: dserrano5 on May 07, 2015, 05:04:45 AM
This post (https://bitcointalk.org/index.php?topic=94488.msg11283129#msg11283129) has a non transparent signature, while this one (https://bitcointalk.org/index.php?topic=419432.msg11283290#msg11283290), by the same user, hasn't.
fixed.

Confirmed it works as expected now. Thanks!


Title: Re: Signature Adblock Script [0.4.0]
Post by: TheRealSteve on May 19, 2015, 01:00:43 AM
Ended up modifying mine a bit - instead of a true/false return in the function, I ended up returning the score.

If the score is below 50 points, it's left untouched.

If the score is above 50 points and below 300 points (just under that of the most egregious ads), the opacity is modified based on how close it is to that 300 points.  So if you've got a signature that's just over 100, it'll just be reduced in opacity but not entirely gone.  The signature is also placed in a new table (could use divs), with the actual score shown on the right, so that score thresholds can be more easily tweaked).

If the score is at or above 300 points, it doesn't just make the signature invisible, it removes it and the horizontal rule above it outright (making it as if the person had no signature at all) and also replaces the user's avatar and tagline, as most of the people who are using signature campaign ads that score that high are using that space to advertise as well.

Before:After:
https://i.imgur.com/0n9CdJq.png (https://i.imgur.com/0n9CdJq.png)https://i.imgur.com/EdXateL.png (https://i.imgur.com/EdXateL.png)


Title: Re: Signature Adblock Script [0.4.0]
Post by: philipma1957 on June 05, 2015, 02:43:05 AM

I no longer rent my space I give it away to people or websites  I like.
It is simple and I make 0 from it.

I do think signatures have  a lot of problems.  
I have a hundred pm's from people wanting to sign me up rent my space  and I no longer will do it.

Full disclosure I made about 5 btc since april 2014. 


But I resent being hounded by signature campaign managers.

  I won't let this happen to me.  I won't be used by a scammer.  I think the campaigns could be put to rest.

This  thread link shows my last   signature  campaign.

https://bitcointalk.org/index.php?topic=1050347.0;all


Title: Re: Signature Adblock Script [0.4.0]
Post by: Phix on July 10, 2015, 08:47:11 AM
Awesome. No more signatures to be seen  :D ;)
Great job mate! :)


Title: Re: Signature Adblock Script [0.4.0]
Post by: 1Referee on July 10, 2015, 09:54:52 PM

I no longer rent my space I give it away to people or websites  I like.
It is simple and I make 0 from it.

Same here. I now advertise for Bitmixer.io for free, just because I love their service.


Awesome. No more signatures to be seen  :D ;)
Great job mate! :)

Says the person who is wearing a paid signature....  :D


Title: Re: Signature Adblock Script [0.4.0]
Post by: Mitchell on September 02, 2015, 09:16:34 PM
The Rollin.io signature for Members isn't blocked with the current implementation:
Quote
ROLLIN.io (https://rollin.io) - The Best Bitcoin Dice
¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦ (https://rollin.io)
[ Affiliate Program (https://rollin.io) ]  [ 0.6% - 1% House Edge (https://rollin.io) ]  [ Get Free Bitcoin Now! (https://rollin.io) ]


Title: Re: Signature Adblock Script [0.4.0]
Post by: guitarplinker on September 19, 2015, 08:14:05 PM
The Rollin.io signature for Members isn't blocked with the current implementation:
Quote
ROLLIN.io (https://rollin.io) - The Best Bitcoin Dice
¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦  ¦¯¦¦¯¦ (https://rollin.io)
[ Affiliate Program (https://rollin.io) ]  [ 0.6% - 1% House Edge (https://rollin.io) ]  [ Get Free Bitcoin Now! (https://rollin.io) ]
It's worth mentioning that this probably isn't a big concern anymore, the Rollin campaign closed a week or so ago, but if grue has a few spare minutes it might be worth looking into.


Title: Re: Signature Adblock Script [0.4.0]
Post by: Sir_lagsalot on September 27, 2015, 10:52:22 PM
Great work. Been looking for a program like this. Sorry if this is offensive Mr Admin, but is there an antivirus scan available for this


Title: Re: Signature Adblock Script [0.4.0]
Post by: bitcoin1992 on October 03, 2015, 06:00:28 PM
thanks for this adblock script.


Title: Re: Signature Adblock Script [0.4.0]
Post by: Mitchell on October 10, 2015, 09:45:59 PM
navaman (https://bitcointalk.org/index.php?action=profile;u=79145) has the following signature, which hasn't been hidden by the extension. Anything you can do about it?

Quote
██░░█  NITROGEN SPORTS
█░█░█   Sportsbook | Poker | Blackjack
█░░██   Bet with me at the largest and most trusted bitcoin sportsbook! (https://nitrogensports.eu/)


Title: Re: Signature Adblock Script [0.4.0]
Post by: DiamondCardz on October 25, 2015, 05:35:26 PM
My solution is just to ignore all users that have joined signature campaigns. They post nonsense just to get paid, so they don't have much to add anyway.

Even as someone with a signature ad, I don't really blame you for this. Those with signature ads post a lot more rubbish and spam than those without, and signature ads have caused a lot of rather unsavoury practices to become much more widespread - botting, account selling, account hacking...etc. Personally I think that all of the signature campaign managers should be a lot stricter on what is paid. If that means you have to exclude 90% of someone's posts and piss them off - then so be it.


Title: Re: Signature Adblock Script [0.4.0]
Post by: Athertle on November 10, 2015, 08:10:30 PM
Is it just me or is the script download link not working?
-snip-

The page is down, yes. Maybe someone can lend you an alternate link.

And just keep the post. It has more content than 90% of posters here. :D


Title: Re: Signature Adblock Script [0.4.0]
Post by: Mitchell on November 10, 2015, 10:15:09 PM
This is my version of the Adblock script: PasteBin raw (http://pastebin.com/raw.php?i=RJCNeRAp) (it replace the whole signature with "Paid signature"). This paste will expire in an hour.


Title: Re: Signature Adblock Script [0.4.0]
Post by: Spoetnik on November 11, 2015, 03:21:19 PM
This is a good idea i tried it and it seems to work thanks :)


Title: Re: Signature Adblock Script [0.4.0]
Post by: ruggedman_dan on December 05, 2015, 11:31:39 AM
Little bump.


Title: Re: Signature Adblock Script [0.4.0]
Post by: Sir_lagsalot on December 05, 2015, 12:41:16 PM
Great script. Do you think you could update it though, so it also removes that annoying black line above where the signature is supposed to go? It gets annoying when the signature is removed and the line makes you the that there is something there... Sorry, OCD.


Title: Re: Signature Adblock Script [0.4.0]
Post by: ruggedman_dan on December 05, 2015, 12:42:51 PM
Great script. Do you think you could update it though, so it also removes that annoying black line above where the signature is supposed to go? It gets annoying when the signature is removed and the line makes you the that there is something there... Sorry, OCD.

Yes, please grue remove also the :





....


Thanks.


Title: Re: Signature Adblock Script [0.4.0]
Post by: ryandanielt on December 28, 2015, 11:24:24 AM
loving it :)


Title: Re: Signature Adblock Script [0.4.0]
Post by: redsn0w on December 30, 2015, 05:33:52 PM
Bump.


Title: Re: Signature Adblock Script [0.4.0]
Post by: grue on January 03, 2016, 02:24:37 AM
Great script. Do you think you could update it though, so it also removes that annoying black line above where the signature is supposed to go? It gets annoying when the signature is removed and the line makes you the that there is something there... Sorry, OCD.
fixed.


Title: Re: Signature Adblock Script [0.3.0]
Post by: grue on January 05, 2016, 05:38:48 AM
This is awesome. Too bad I can't use it on my mobile :(
If you're on android you might be in luck! I did some research last weekend and it turns out it's really easy to port a greasemonkey script to a Firefox addon, which works on Firefox for Android. I hacked together a version and submitted it to AMO but it's currently awaiting review. You can download it here: https://addons.mozilla.org/en-US/firefox/addon/bitcointalk-signature-adblock/. It's currently awaiting review. Before that, it won't be signed so you'll need to disable addon signatures for it to work.


Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on January 07, 2016, 02:43:25 PM
Thanks again -  it's working great !

Spoetnik Approved™


Title: Re: Signature Adblock Script [0.5.0]
Post by: HITTI2 on January 08, 2016, 10:09:08 AM
I dunno what is up but it doesn't work for me.

https://i.imgur.com/0wnmpyF.jpg


Title: Re: Signature Adblock Script [0.5.0]
Post by: subSTRATA on January 08, 2016, 10:14:45 AM
I dunno what is up but it doesn't work for me.

[im g]https://i.imgur.com/0wnmpyF.jpg[/img]
those are the forum ads, the script is made to block the paid signature advertisements that appear below a post. for example, you shouldn't be able to see the betcoin signature ad below this post, whereas if you disabled the script, it should be visible. however, with the script enabled, you should be able to see grue's signature.


Title: Re: Signature Adblock Script [0.5.0]
Post by: bitspill on January 08, 2016, 10:37:35 AM
I dunno what is up but it doesn't work for me.

https://i.imgur.com/0wnmpyF.jpg

As mentioned that's a forum ad rather than a signature ad and if you really want to hide it you can from your profile settings by checking the "disable ads" check box.


Title: Re: Signature Adblock Script [0.5.0]
Post by: HITTI2 on January 08, 2016, 10:42:15 AM
Ohh. I see now. I thought it was all the same, ads are ads.


Title: Re: Signature Adblock Script [0.5.0]
Post by: mexxer-2 on January 08, 2016, 10:45:41 AM
if you really want to hide it you can from your profile settings by checking the "disable ads" check box.
Only Hero , Legendary, Donator and staff have that option


Title: Re: Signature Adblock Script [0.5.0]
Post by: HITTI2 on January 08, 2016, 10:46:53 AM
if you really want to hide it you can from your profile settings by checking the "disable ads" check box.
Only Hero , Legendary, Donator and staff have that option

yea that's what I thought. I was searching my pro and even hit ctrl + f typed in ads and searched every link option under profile.

So yea, that would be cool if Grue can enable ad blocking too!

This is the reason I don't want to see them, never know when accidentally clicked on.

Quote
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.


Title: Re: Signature Adblock Script [0.5.0]
Post by: mexxer-2 on January 08, 2016, 10:47:57 AM
SO yea, that would be cool if Grue can enable ad blocking too!
Use adblock plus extension, manually remove the element


Title: Re: Signature Adblock Script [0.5.0]
Post by: HITTI2 on January 08, 2016, 10:48:51 AM
SO yea, that would be cool if Grue can enable ad blocking too!
Use adblock plus extension, manually remove the element

Can't do it. Theymos had come up with a brilliant way of blocking ad blockers from blocking ads here. Elements get scrambled. Smart bastard lol.


Title: Re: Signature Adblock Script [0.5.0]
Post by: mexxer-2 on January 08, 2016, 10:55:15 AM
Can't do it. Theymos had come up with a brilliant way of blocking ad blockers from blocking ads here. Elements get scrambled. Smart bastard lol.
Seems so, theymos can be one... smart guy some times(did you think I was gonna call the almighty admin a bastard?)


Title: Re: Signature Adblock Script [0.5.0]
Post by: HITTI2 on January 08, 2016, 10:58:24 AM
Can't do it. Theymos had come up with a brilliant way of blocking ad blockers from blocking ads here. Elements get scrambled. Smart bastard lol.
Seems so, theymos can be one... smart guy some times(did you think I was gonna call the almighty admin a bastard?)

Nah, but that's why I put lol, just joking. I bet he is one of the smartest persons on earth though. Probably will go insane in a couple years being so smart. I think it's a burden actually.


Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on January 08, 2016, 12:20:10 PM
FireFox + Adblock Script and Adblock Plus and Adblock Plus Element-hider FTW !

Element Hider has a configurable setup.. you don't even have to use the ID for an element.


Title: Re: Signature Adblock Script [0.5.0]
Post by: grue on January 31, 2016, 12:03:34 AM
This is awesome. Too bad I can't use it on my mobile :(
If you're on android you might be in luck! I did some research last weekend and it turns out it's really easy to port a greasemonkey script to a Firefox addon, which works on Firefox for Android. I hacked together a version and submitted it to AMO but it's currently awaiting review. You can download it here: https://addons.mozilla.org/en-US/firefox/addon/bitcointalk-signature-adblock/. It's currently awaiting review. Before that, it won't be signed so you'll need to disable addon signatures for it to work.
It's approved now.


Title: Re: Signature Adblock Script [0.5.0]
Post by: HITTI2 on January 31, 2016, 01:48:54 PM
This is awesome. Too bad I can't use it on my mobile :(
If you're on android you might be in luck! I did some research last weekend and it turns out it's really easy to port a greasemonkey script to a Firefox addon, which works on Firefox for Android. I hacked together a version and submitted it to AMO but it's currently awaiting review. You can download it here: https://addons.mozilla.org/en-US/firefox/addon/bitcointalk-signature-adblock/. It's currently awaiting review. Before that, it won't be signed so you'll need to disable addon signatures for it to work.
It's approved now.

Very cool.


Title: Re: Signature Adblock Script [0.5.0]
Post by: xqus on February 14, 2016, 12:11:22 PM
Perfect. Works like a charm! :)


Title: Re: Signature Adblock Script [0.4.0]
Post by: Xialla on February 17, 2016, 07:26:19 AM
My solution is just to ignore all users that have joined signature campaigns. They post nonsense just to get paid, so they don't have much to add anyway.

sadly, you are right. only way, how to raise quality of this board again is to disable signatures and let signatures managers/whores go away. is so obvious, how whores posting anything just because every posts counts..


Title: Re: Signature Adblock Script [0.5.0]
Post by: HeroC on March 06, 2016, 06:46:43 PM
Nice script, do you hardcode sigs to block or try to detect them?


Title: Re: Signature Adblock Script [0.5.0]
Post by: n691309 on March 06, 2016, 06:53:14 PM
I don't know if it is just for Heros but i have an option "Don't show users' signatures." and it removes the signatures to all users have you guys tried this option?


Title: Re: Signature Adblock Script [0.5.0]
Post by: brituspol on March 06, 2016, 06:55:05 PM
I don't know if it is just for Heros but i have an option "Don't show users' signatures." and it removes the signatures to all users have you guys tried this option?
It is available to everyone. Still you have a special ability to block forum ads if you are Hero and above


Title: Re: Signature Adblock Script [0.5.0]
Post by: n691309 on March 06, 2016, 06:57:42 PM
I don't know if it is just for Heros but i have an option "Don't show users' signatures." and it removes the signatures to all users have you guys tried this option?
It is available to everyone. Still you have a special ability to block forum ads if you are Hero and above

If it is available to everyone then it's much better than running a script? The signatures does not hurt my eyes and i like to see what kind of signatures are people wearing.


Title: Re: Signature Adblock Script [0.5.0]
Post by: brituspol on March 06, 2016, 07:00:05 PM
I don't know if it is just for Heros but i have an option "Don't show users' signatures." and it removes the signatures to all users have you guys tried this option?
It is available to everyone. Still you have a special ability to block forum ads if you are Hero and above

If it is available to everyone then it's much better than running a script? The signatures does not hurt my eyes and i like to see what kind of signatures are people wearing.
This script is for fancy signatures. The one in options removes all the signatures. This one only removes the one which are so fancy that they must belong to a signature campaign


Title: Re: Signature Adblock Script [0.5.0]
Post by: tunctioncloud on March 20, 2016, 09:28:13 AM
Bump.

what i have to do is just install Firefox extension ?


Title: Re: Signature Adblock Script [0.5.0]
Post by: redsn0w on March 20, 2016, 09:30:41 AM
Bump.

what i have to do is just install Firefox extension ?


Yes, install this extension :

 - https://addons.mozilla.org/en-US/firefox/addon/bitcointalk-signature-adblock/



Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on April 01, 2016, 02:23:26 AM
SO yea, that would be cool if Grue can enable ad blocking too!
Use adblock plus extension, manually remove the element

Yup.. i use AdblockPlus "Element Hider" add-on too and it's great  ;D
I have the 2 extensions on both Chrome + Firefox.
But i noticed not long ago they messed up the way the Element-Hider works on Chrome.
You use to be able to get a preview of sorts and it was easier to get at what you wanted hide.
They now made it way harder to use.  :(

Both browsers have gone crazy changing things  >:(
They just can't leave things alone..

Also for LOL'z check out V. Butterin outing theymos for being such an Ad-monger LOL
https://bitcoinmagazine.com/articles/bitcointalk-at-war-with-ad-blockers-1369691906

What i found funny from that story is how much effort theymos has invested in getting ad's to work here.
and when i had registered in 2013 and BTC was still below $50 everyone
kept saying he had already gotten like a million dollars in donations.
And in 2016 they have this New forum thing they say "we're working" on..
The Million dollar forum LOL
Would have to be the most expensive forum in human history ahhahahha
Missed the point? ..priorities ::)

EDIT:
Almost forgot to mention the chronic 502's and lag all the time too.


Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on April 01, 2016, 04:23:42 PM
@Gahs
You are free to look at all the SIG campaign signatures you want.
We all on the hand may not want to see them.

Did you understand what this script is about?
It helps the script user not see *some* sig's
So if you DO want to see them then simple, don't install the script.
Nobody is forcing you to install this script here.. it's an option for those that want it.

EDIT: Fixed spelling


Title: Re: Signature Adblock Script [0.5.0]
Post by: ElMoIsEviL on April 02, 2016, 05:25:21 PM
On iceweasel "firefox for linux" it does not work i have grasemonkey installed but it does not block the ad's for now maybe i have some issues on my side iw ill try to debug this but can anyone else confirm it does not work for iceweasel?


Title: Re: Signature Adblock Script [0.5.0]
Post by: pr0d1gy on April 03, 2016, 06:17:28 PM
Signatures really don't bother me, but if you really want to get rid of them, just use ABP + Element Hiding Helper (https://adblockplus.org/elemhidehelper)

If you mess with the values, I'm sure you could block all signatures, my example just picks on ElMoIsEviL (sorry, just using you as example) lol

Open the helper...
https://i.imgur.com/JLZ3ue4.png

Mouse over what you wish to block. (it will highlight it in red)
https://i.imgur.com/u0doG07.png

Block that specific thing (or edit and try to block all? if possible)
https://i.imgur.com/gW2NXNf.png

https://i.imgur.com/R3JP4By.png

I even went and check his other posts, and his signature is gone from there as well. So if someone is better with ABP I'm sure just adding that certain value would block every signature.

Just my .0001 btc ¯\_(ツ)_/¯


Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on April 05, 2016, 02:30:39 PM
Just to make it clear for Noobs this is for the Signatures the script detects as a "Campaign"
From what i can tell is it has worked perfectly.
It does not block "Ad's" it removes *some* SIG's.

But if we are talking about Ad's ALSO then you can remove them in the forum options if you want to.
Only when your account has reached Hero level will you see the option.
The choice is up to you if you REALLY want to disable the forum ad's here though.
It IS cool of him to make that option available for some of us.

Thanks again Grue.
And for your help on the Mycroft browser search provider i submitted. (works on Firefox but not Chrome last i checked)
http://mycroftproject.com/search-engines.html?name=Bitcointalk.org


Title: Re: Signature Adblock Script [0.5.0]
Post by: Freddynic159 on April 05, 2016, 03:30:16 PM
I have installed the script and I really like since I'm from people that don't like to see colorful signatures and with an exaggerated font size, but it is understandable that such campaigns do to draw attention and attract customers which is good for them.

Thank you, grue.


Title: Re: Signature Adblock Script [0.5.0]
Post by: ronaldo2 on April 10, 2016, 09:26:28 PM
Interesting...

But, Profile 8=D Look and Layout Preferences 8=D Don't show users' signatures.  ???


Title: Re: Signature Adblock Script [0.5.0]
Post by: Freddynic159 on April 10, 2016, 09:58:59 PM
Interesting...

But, Profile 8=D Look and Layout Preferences 8=D Don't show users' signatures.  ???

What do you mean? the differences between them have already been mentioned above.

Don't show users' signatures = It is to hide absolutely all the signatures of the users (including some that could be useful).

Signature Adblock Script = It is to hide the signatures that belong to campaigns and are usually very colorful and have an exaggerated font size that could bother some people (like me).


Title: Re: Signature Adblock Script [0.5.0]
Post by: kyren on April 11, 2016, 11:35:20 PM
This is fantsatic and an absolute necessity for this forum

Thanks grue


Title: Re: Signature Adblock Script [0.5.0]
Post by: Decoded on April 12, 2016, 10:08:26 AM
Just downloaded this. I had no idea of what I was missing. Reading through this forum is much more enjoyable now. But I mainly go on this thread on my phone, so I'll have to install the slow and laggy tampermonkey browser :(


Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on April 14, 2016, 02:53:19 PM
imagine if this place supported SIG images like on XDA
That forum blows me away..

From Broken English users begging for donations for shitty re-posts of crap info.
to the Mod's + Users having massive giant hulking pointless image banners.

That place knows how to SIG spam with the best of them.
And i sure as hell would never have any respect for a site moderator who has a giant spam banner.
ALL i ever think is DOUCHE when i see that.

It's typical to see a simple 1 line post / topic and the users banner
taking up 8 times as much space as his 1 line comment.
Simply retarded!

You see mine ? Expect weird LOL
I reserve that spot for Spoetnik'isms ahhahaha

I wish i could have me a signature here like on XDA..
I would have a massive giant FLASHING / pulsing banner about being ELITE !!!!!!!!!
with maybe a batman logo with my name (i noticed they love using the Batman logo in Avatars over there)

PS:
The staff at XDA are fucking brats and morons.
You all think this place is bad? head over there ;)


Title: Re: Signature Adblock Script [0.5.0]
Post by: BitcoinBlackjack on April 23, 2016, 01:08:35 AM
Pretty sure this will make the mods and admins upset! But it is a job well done besides that!


Title: Re: Signature Adblock Script [0.5.0]
Post by: bitspill on April 23, 2016, 04:32:07 AM
Pretty sure this will make the mods and admins upset! But it is a job well done besides that!

Ok. Two quick questions.

1) Why would hiding signatures make the mods/admins upset?
2) Did you see that this was written and posted by a Global Moderator?

Oh, wait. You're wearing one of those paid signatures.
Edit: My mistake you're advertising your own service. Although I still think the filter might catch and hide it.


Title: Re: Re: Signature Adblock Script [0.5.0]
Post by: bcmine on April 27, 2016, 09:27:30 AM
Bumping

i am not allowed to accept code from this page  :o but interesting


Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on April 28, 2016, 06:55:59 PM
Impending Doom for Firefox on it's way..

I have been growing more and more pissed off with Mozilla over the years.
I lost count how many features have been changed / made worse over time.

So.. i say this because a couple major things are coming.
One is last year Mozilla & Google announced that Plugins will be discontinued by end of 2016.
For example the Java plugin is dead now.. officially discontinued.
Example / proof.. Moving to a Plugin-Free Web (Java Platform Group, Product Management blog) (https://blogs.oracle.com/java-platform-group/entry/moving_to_a_plugin_free)

But that has nothing to do with this script posted here.

The 2nd point i wanted to mention does i think..

Read this response by a Firefox Extension coder on the coming 2nd change.. http://www.downthemall.net/

Quote


Mozilla just announced their intent to deprecate so called XUL-based add-ons in favor of what they call the WebExtensions API within the next year or two. The WebExtensions API is supposed to be mostly compatible to Chrome/Safari extension APIs.

What does this mean for DownThemAll!? Well, for starters, DownThemAll! will be dead if XUL-based add-ons with XPCOM access are gone. Simple as that. The new APIs would only allow for a severely limited in functionality, severely stripped down DownThemAll! at best.

Gone with DownThemAll! will be add-ons that e.g. let you change major bits about the Firefox user interface (e.g. tabs tree add-ons), add-ons that allow you to do more “advanced” stuff than just showing or slightly altering websites, such as e.g. restarting the browser upon click (unless mozilla kindly provides an API for that, which won’t be compatible with Chrome, of course). Add-ons like NoScript will be severely limited in their feature set as well. Say byebye to Greasemonkey and hello to Tampermonkey, with it’s limitations. Want that add-on that lets you change the new tab page for something else or enhances that page? Maybe it will be available, maybe not, depending on if and when mozilla kindly provides WebExtensions APIs for such things. And of course, depending on if there will be an author creating this entirely new add-on from scratch.

What this also means: Almost all your existing add-ons will be broken, entirely, save for some Add-on SDK add-ons, namely those that don’t do anything fancy. Sure, even today, lots of add-ons break, and some add-ons will not get updated when they do and there are no suitable replacements. However, with this change, almost every add-on will be completely broken and in need of major updating by the extension authors. Good luck with that.

It is safe to say, that Firefox will not be Firefox anymore as far as extensions go, but instead will become yet another Chrome-clone.

To be clear: I was furious when the extension signing stuff was announced and then actually implemented, which effectively created yet another Walled Garden, but regarding this announcement I am just sad. Right now, it feels like I just learned my dear old friend Firefox is going to die.

I have known this for a while and stopped updating.. i am not impressed with Mozilla.

That will have a massive impact.. my Password Depot - Password Manager Extension use XPCOM.

So just a heads up this script here may have issues soon.
And i don't know about anyone else but i am done with Firefox.
And Chrome is not much different either.


Title: Re: Signature Adblock Script [0.5.0]
Post by: grue on May 22, 2016, 02:22:04 PM
Just downloaded this. I had no idea of what I was missing. Reading through this forum is much more enjoyable now. But I mainly go on this thread on my phone, so I'll have to install the slow and laggy tampermonkey browser :(
Firefox for android is also an option. I packaged the script as an addon for it.


Title: Re: Signature Adblock Script [0.5.0]
Post by: redsn0w on June 24, 2016, 04:19:53 PM
Bump.


Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on January 29, 2017, 01:39:45 AM
Just want to say this is still working as good as day 1 when i installed it.
I give it two AK's up  ;D


Title: Re: Signature Adblock Script [0.5.0]
Post by: Freddynic159 on April 05, 2017, 03:12:19 AM
Just want to say this is still working as good as day 1 when i installed it.
I give it two AK's up  ;D

Yep, I'm using it in Opera with Violentmonkey and works fine.


Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on July 21, 2017, 06:34:01 AM
Just downloaded this. I had no idea of what I was missing. Reading through this forum is much more enjoyable now. But I mainly go on this thread on my phone, so I'll have to install the slow and laggy tampermonkey browser :(
Firefox for android is also an option. I packaged the script as an addon for it.

I missed this comment and was curious about FF on Android but never tried it yet.
I take it Greasemonkey works on the Android version then ?

And the script seems to work really well still.
Thanks  ;D


Title: Re: Signature Adblock Script [0.5.0]
Post by: Spoetnik on February 02, 2018, 02:24:59 AM
Pretty sure this will make the mods and admins upset! But it is a job well done besides that!

What an idiot  :D
Hey noob go look who fucking posted it.. "Global Moderator" hahahhaha

By the way it still works really well.


Title: Re: Signature Adblock Script [0.5.0]
Post by: RomertL on February 02, 2018, 08:00:30 AM
Very useful script for those people who just want chat or read new information on the forum without seeing advertising  ;)


Title: Re: Signature Adblock Script [0.5.0]
Post by: bitspill on February 02, 2018, 03:21:33 PM
Very useful script for those people who just want chat or read new information on the forum without seeing advertising  ;)

You mean like your own massive signature?


Title: Re: Signature Adblock Script [0.5.0]
Post by: dkbit98 on July 26, 2019, 08:33:00 PM
Resurrecting this topic from hibernation   ;D

Is it possible to simply create custom rules for uBlock extension
for blocking bitcointalk ads?

https://github.com/gorhill/uBlock


Title: Re: Signature Adblock Script [0.5.0]
Post by: dkbit98 on July 26, 2019, 08:49:48 PM
Resurrecting this topic from hibernation   ;D

Is it possible to simply create custom rules for uBlock extension
for blocking bitcointalk ads?

https://github.com/gorhill/uBlock
Yes. But you will need to block every ad element seperately. Might seem like a lot of work, but it can be done fairly easily.

Simply choose the element you want to block with eyedropper and make the filter. refresh the page a couple times until every ad is gone.


But... Only do this if you must. Ads help the forum, and in part often it's users.


I would love to see that done one day :)
It would be universal and for all browsers with uBlock extension

I meant it like this
https://github.com/gorhill/uBlock/wiki/Filter-lists-from-around-the-web
https://filterlists.com/