Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Hide reputation
- // @namespace theymos.com
- // @description Hides the reputation text on the Bitcoin forum
- // @include *://www.bitcoin.org/smf/index.php*topic*
- // @exclude *://www.bitcoin.org/smf/index.php?board*
- // @exclude *://www.bitcoin.org/smf/index.php
- // @exclude *://www.bitcoin.org/smf/
- // @exclude *://www.bitcoin.org/smf
- // ==/UserScript==
- function getElementsByClass(classname,tag)
- {
- var output=new Array();
- var allTags=document.getElementsByTagName(tag);
- for (i in allTags)
- {
- if (allTags[i].className==classname)
- {
- output.push(allTags[i]);
- }
- }
- return output;
- }
- pattern1=/.*Reputation: \+[0-9]+\/-[0-9]+<br>.*/;
- pattern2=/.*<a href=".*modifykarma.*\[ . \].*/g;
- alldivs=getElementsByClass("smalltext","div");
- if(alldivs.length<400)
- {
- for(i in alldivs)
- {
- innerhtml=alldivs[i].innerHTML;
- if(innerhtml.length<4000)
- {
- oldhtml=innerhtml;
- innerhtml=innerhtml.replace(pattern1,"");
- if(innerhtml!=oldhtml)
- {
- innerhtml=innerhtml.replace(pattern2,"");
- alldivs[i].innerHTML=innerhtml;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement