4chan gsdv remover

By tungtn Last update Oct 26, 2007 — Installed 276 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 6 posts, 5 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Avindra V.G. Scriptwright

no clue what this does, just looked at general code, and it could be:

// ==UserScript==
// @name           4chan gsdv remover
// @namespace      lol
// @description    Removes gsdv.jpg spam from 4chan.
// @include        http://img.4chan.org/*
// ==/UserScript==
function deleteEl(x) {
x.parentNode.removeChild(x)
}

var gsdv = document.evaluate("//span[@class='filesize']",document,null,6,null);
for (var i=0;i<gsdv.snapshotLength;i++) {
	var tmp = gsdv.snapshotItem(i).textContent;
	if (tmp.indexOf("-(14 KB, 209x349,") >= 0
			|| tmp.indexOf("-(14 KB, 154x261,") >= 0) {
	deleteEl(gsdv.snapshotItem(i).parentNode.parentNode.parentNode);
	}
}

Also, judging by the indexOf's, I'm assuming you can develop a better xpath than "//span[@class='filesize']"

 
Kamichu Scriptwright

write script*

 
Kamichu Scriptwright

what's gsdv spam? I suddenly want to write that will bypass this remover

 
tungtn Script's Author

Just on the img server actually, but that seems to be the only place where it's an issue.

 
ParagonOfEvil Scriptwright

It's so... beautiful...

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel