Well, I did check out a few basic tutorials on Greasemonkey/JS coding.
But the thing I can't find anything on is the text AFTER/BEFORE the
text to be replaced part. I can't find anything that seems to do
this.
As for data management, I'd probably be the only person to use this so
I have no qualms
After chopping up another Greasemonkey script, I've gotten this far.
var words = {
what : test,
}
var matches=new Array()
var replacements=new Array()
for(var word in words) {
matches.push(new RegExp(\\b+word+\\b, 'gi'));
replacements.push(words[word]);
}
On 2011-06-25 05:17, Harahune wrote:
After chopping up another Greasemonkey script, I've gotten this far.
var words = {
what : test,
}
Style note: leave off the comma if it's the last in the object
definition -- example:
var words = {
what : test,
x2: x3
}