It is currently Tue Mar 17, 2020 3:43 am

All times are UTC - 7 hours



Post new topic Reply to topic  [ 6 posts ] 
Author Message
Post subject: Anyone use FireFox and Greasemonkey?
Posted: Sat Aug 31, 2013 3:48 pm
Offline
Professional Musician
Professional Musician
User avatar

Joined: Thu Jan 10, 2013 7:02 pm
Posts: 1978
Location: Manchester
... because if you do then here's a user script I wrote to filter out any forum posts using the Russian alphabet, works for me.

And yeah, this is released into the public domain for any use. So if anyone wants to adapt it to server-side PHP script then y'know, that's cool with me too.

Code:
// ==UserScript==
// @name        Fender forum
// @namespace   http://example.com/
// @include     http://forums.fender.com/viewforum.php?f=*
// @version     1
// ==/UserScript==


var tds = document.getElementsByClassName("row1");

for each (var td in tds) {
   for each (var cn in td.childNodes)
   {
      if ((cn.innerHTML != null) && (cn.tagName.toUpperCase() == "A"))
      {
      
         var linkText =  cn.innerHTML;
         if (linkText.charCodeAt(0) >= 1000) { //this catches unicode characters and hence most of the Russian Cyrillic alphabet
            td.parentNode.style.display = "none";
         }
      }
   }
}

_________________
Image
Image my stuff on soundcloud


Top
Profile
Fender Play Winter Sale 2020
Post subject: Re: Anyone use FireFox and Greasemonkey?
Posted: Sat Aug 31, 2013 5:14 pm
Offline
Rock Star
Rock Star
User avatar

Joined: Mon Jan 12, 2009 4:50 pm
Posts: 7998
Location: ʎɹʇunoɔ ǝsoɹ pןıʍ
Yer a man of many talents, Frank.
So how would one go about implemementing your code?

_________________
Image
Just think of how awesome a guitar player you could have been by now if you had only spent the last 10 years practicing instead of obsessing over pickups and roasted maple necks.


Top
Profile
Post subject: Re: Anyone use FireFox and Greasemonkey?
Posted: Sat Aug 31, 2013 5:48 pm
Offline
Professional Musician
Professional Musician
User avatar

Joined: Thu Jan 10, 2013 7:02 pm
Posts: 1978
Location: Manchester
It'll only work in FireFox with the Greasemonkey addon installed. Click the Greasemonkey icon, hit New User Script, give it any old name, copy that code into the Notepad window when it appears and save it.

_________________
Image
Image my stuff on soundcloud


Top
Profile
Post subject: Re: Anyone use FireFox and Greasemonkey?
Posted: Sun Sep 01, 2013 4:22 am
Offline
Aspiring Musician
Aspiring Musician
User avatar

Joined: Tue May 15, 2012 2:49 am
Posts: 560
Location: Perth, Australia
Cool :D - is this to keep those spammers out of view?

_________________
GUITAR: Fender USA JazzMaster.
BASS: Fender USA 58'AVRI
AMP: Fender USA SuperSonicTwin - Blonde.
Image


Top
Profile
Post subject: Re: Anyone use FireFox and Greasemonkey?
Posted: Sun Sep 01, 2013 6:17 am
Offline
Hobbyist
Hobbyist

Joined: Tue Aug 27, 2013 5:58 pm
Posts: 69
If I'm not mistaken there is a version of Greasemonkey for Chrome too, correct?


Top
Profile
Post subject: Re: Anyone use FireFox and Greasemonkey?
Posted: Tue Sep 03, 2013 5:19 am
Offline
Rock Icon
Rock Icon
User avatar

Joined: Mon Jul 16, 2007 6:51 pm
Posts: 25353
Location: Witness Protection Program
TheMaxwell wrote:
If I'm not mistaken there is a version of Greasemonkey for Chrome too, correct?


Tampermonkey is the most popular userscript manager for Google Chrome.

_________________
Being able to play and enjoy music is a gift that's often taken for granted.

Don't leave home without it!


Top
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours

Fender Play Winter Sale 2020

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: