Random one line javascript "filter"
Feb. 28th, 2008 01:08 amGlobal:
Restricted to divs:
Because I was somewhat bored. Find a page that has bad words, copy and paste the above line into your browser location and hit enter.
In short, it grabs the document, searches for elements by tags and loads that into an array, then steps through the array, replacing any instances of "fuck, cunt, bitch, cock, shit, piss", with "bubbles".
javascript:var%20d=document;var%20s=d.getElementsByTagName("*");for(var%20i=0;i<s.length;i++){s[i].innerHTML=s[i].innerHTML.replace(/fuck|cunt|bitch|cock|shit|piss/ig,'bubbles');}
Restricted to divs:
javascript:var%20d=document;var%20s=d.getElementsByTagName("div");for(var%20i=0;i<s.length;i++){s[i].innerHTML=s[i].innerHTML.replace(/fuck|cunt|bitch|cock|shit|piss/ig,'bubbles');}
Because I was somewhat bored. Find a page that has bad words, copy and paste the above line into your browser location and hit enter.
In short, it grabs the document, searches for elements by tags and loads that into an array, then steps through the array, replacing any instances of "fuck, cunt, bitch, cock, shit, piss", with "bubbles".