[Greasemonkey] Parenthesis

Lenny Domnitser ldrhcp at gmail.com
Mon Mar 27 11:42:22 EST 2006


On 3/27/06, Oatka <oatka at yahoo.com> wrote:
> I'm using Greasemonkey to change a page that I use at work. The page contains
> parenthesis that I can't seem to remove. Any code out there to remove the
> parenthesis that show up on the page?

var textnodes = document.evaluate('/html/body//text()', document,
null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for(var c = 0, text; textnode = textnodes.snapshotItem(c); c++) {
  textnode.nodeValue = textnode.nodeValue.replace(/([\(\)])/g, '');
}


More information about the Greasemonkey mailing list