Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
IDDQD
// ==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
You can’t perform that action at this time.