Skip to content

Instantly share code, notes, and snippets.

@lain-dono
Created December 11, 2015 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lain-dono/a2d142fa54a89f69ab5f to your computer and use it in GitHub Desktop.
Save lain-dono/a2d142fa54a89f69ab5f to your computer and use it in GitHub Desktop.
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