Removes begspam from Bitsoup
当前为
// ==UserScript==
// @name Bitsoup Stop Whining
// @namespace http://takebackbitsoup.com
// @version 1.01
// @description Removes begspam from Bitsoup
// @include http://*.bitsoup.me/*
// @include https://*.bitsoup.me/*
// @include http://*.soupbit.me/*
// @include https://*.soupbit.me/*
// @run-at document-end
// @author bitskewer
// @match http://*.bitsoup.me/*
// @match https://*.bitsoup.me/*
// @match http://*.soupbit.me/*
// @match https://*.soupbit.me/*
// @locale en
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
window.addEventListener("load", function(e) {
addButton();
}, false);
function addButton(){
$("#restoreButton").html('<input id="restoreButton" type="button" value="Begging message removed - Click here to view it" />');
$("#restoreButton").bind('click', doRestore);
}
function doRestore() {
var spam = $(".main > span:nth-child(2)");
if (spam) {
spam.show();
$("#restoreButton").hide();
}
}
var dismiss = function() {
var link = $("a[href*='announcement.php']");
if (link && link.attr("href")) {
// jquery doesn't seem to do position absolute so use DOM directly
var iframe = document.createElement('iframe');
iframe.style.width = '1px';
iframe.style.height = '1px';
iframe.style.position = 'absolute';
iframe.style.top = '10px';
iframe.style.left = '10px';
iframe.src = link.attr("href");
document.body.appendChild(iframe);
}
};
var spam = $(".main > span:nth-child(2)");
if (spam) {
spam.hide(1000);
setTimeout(dismiss, 3000 + (Math.random() * 7000));
var sp1 = document.createElement("button");
sp1.id = "restoreButton";
$( "<button id='restoreButton'></button>" ).insertAfter(spam);
}