Quote (PENandPAPER @ Mon, Oct 19 2009, 09:36am)
This is such good concept... just leave it to programmers with the slightest amount of free time to invent a "win" button!
I will try this out asap.
Quick question though; Where do we add more people to block, in the code?
Codevar regexString = prompt('Please set the regular expression used to select users to automatically hide (or blank not to hide any).','Muted');
After 'Muted'?
Say, I wanted to block the following people (for example):
-Muted
-Ghot
-JuicyFruitSweet
-Urbanshaft
(and possibly others)
Would I write(?):
Codevar regexString = prompt('Please set the regular expression used to select users to automatically hide (or blank not to hide any).','Muted' , 'Ghot' , 'JuicyFruitSweet');
I'm assuming you don't know regular expressions...
The first time you run the script, it will ask you for the regular express you would like to use to automatically filter people. If you want to do more, you have to regex them together in the text box with a '|'. Which means, your question would be something like:
Quote
Muted|Ghot|JuicyFruitSweet|UrbanShaft
This option can be changed at any time by selecting Tools>Greasemonkey>User Script Commands>Set D2jsp Forums Autohide
Quote (NoWhere @ Mon, Oct 19 2009, 09:53am)
try this:
Code
var regexString = prompt('Please set the regular expression used to select users to automatically hide (or blank not to hide any).','/Muted|Ghot|JuicyFruitSweet|Urbanshaft/');
i haven't really looked at the script so it may not work
This won't work, since I build a regexp literal from the string, whereas the /.../ statement tells Javascript to build a regexp literal. So, those slashes are interpreted as actual regexp code, which is not what you want to happen.
This post was edited by ASBands on Oct 19 2009 09:14am