Created
December 11, 2015 20:13
-
-
Save lain-dono/a2d142fa54a89f69ab5f to your computer and use it in GitHub Desktop.
IDDQD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name IDDQD | |
// @namespace dobro | |
// @include http://dobrochan.com/b/* | |
// @include http://dobrochan.ru/b/* | |
// @include http://dobrochan.org/b/* | |
// @include https://dobrochan.com/b/* | |
// @include https://dobrochan.ru/b/* | |
// @include https://dobrochan.org/b/* | |
// @version 1 | |
// @author lain-dono | |
// @grant none | |
// ==/UserScript== | |
var count = 10 | |
var timeout = 3000 | |
var thread_re = /(\d+)/ | |
function hide_first() { | |
var href = $('a.hide:first').attr('href').replace('redir', 'json') | |
var thread = href.match(thread_re)[1]; | |
$.get(href, {}, function(response) { | |
$('#thread_'+thread).hide("slow", function() { | |
$('#thread_'+thread).remove() | |
if(count-- > 1) { | |
setTimeout(hide_first, timeout) | |
} else { | |
location.reload() | |
} | |
}) | |
}); | |
console.log(thread) | |
} | |
setTimeout(hide_first, timeout) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment