Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
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']" |
|
|
write script* |
|
|
what's gsdv spam? I suddenly want to write that will bypass this remover |
|
|
Just on the img server actually, but that seems to be the only place where it's an issue. |
|
|
It's so... beautiful... |