Bitsoup Stop Whining

Removes begspam from Bitsoup

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==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);
}