Bitsoup Stop Whining

Removes begspam from Bitsoup

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Bitsoup Stop Whining
// @namespace    http://takebackbitsoup.com
// @version      1.05
// @description    Removes begspam from Bitsoup
// @include        http://*.bitsoup.me/*
// @include        https://*.bitsoup.me/*
// @include        http://*.soupbit.me/*
// @include        https://*.soupbit.me/*
// @include        http://*.bitsoup.org/*
// @include        https://*.bitsoup.org/*
// @run-at         document-end
// @author       bitskewer
// @match        http://*.bitsoup.me/*
// @match        https://*.bitsoup.me/*
// @match        http://*.soupbit.me/*
// @match        https://*.soupbit.me/*
// @match        http://*.bitsoup.org/*
// @match        https://*.bitsoup.org/*
// @locale         en
// @require       http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js

// ==/UserScript==


var link = $('a:contains("Here")');
var spam;
if (link && link.length == 1 && link.attr("href")) {
    if (link.html().length == 20) 
        spam = $("table[width=600]");
    else
        link = null;
}

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() {
    if (spam) {
        spam.show();
        $("#restoreButton").hide();
    }
}


var dismiss = function() {
    // 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);    
};

if (spam) {
    spam.hide(1000);
    setTimeout(dismiss, 3000 + (Math.random() * 7000));

    $( "<button id='restoreButton'></button>" ).insertAfter(spam);
}