SteamGifts Blacklist Searcher (steamgifts.com)

Tired of getting blacklisted on SteamGifts? Want to counter those blacklisters? Run this script and find dem blacklisters! Note: script is very slow and uses lots of memory and may crash from time to time, and you will not be able to do anything on that tab (Script runs on https://www.steamgifts.com/users)

目前為 2016-12-04 提交的版本,檢視 最新版本

// ==UserScript==
// @name         SteamGifts Blacklist Searcher (steamgifts.com)
// @version      1.3
// @description  Tired of getting blacklisted on SteamGifts? Want to counter those blacklisters? Run this script and find dem blacklisters! Note: script is very slow and uses lots of memory and may crash from time to time, and you will not be able to do anything on that tab (Script runs on https://www.steamgifts.com/users)
// @match        https://www.steamgifts.com/users
// @grant    GM_getValue
// @grant    GM_setValue
// @license  MIT License
// @namespace https://gf.qytechs.cn/users/73819
// ==/UserScript==

var url = "https://www.steamgifts.com/users/search?page=";
var page = prompt("Which page from https://www.steamgifts.com/users do you want to start searching from?", GM_getValue ("SGUserPage", 1));
GM_setValue ("SGUserPage", page === null? GM_getValue ("SGUserPage", 1) : page);

var numBlackLists = prompt("How many blacklists do you have left from that page?", GM_getValue ("numBlackLists", 0));
GM_setValue ("numBlackLists", numBlackLists === null? GM_getValue ("numBlackLists", 0) : numBlackLists);

// loop forever until we found all blacklists
while (numBlackLists > 0) {
    $.ajax({
        url: url + page,
        type: "GET",
        async: false, // check one at a time
        success: function(result){
            var innerDivs = $(result).find("div[class='table__row-inner-wrap']");
            innerDivs.each(
                function(){
                    // skip level 0, most have 0 giveaways, very low probability of them being the one to blacklist you
                    var spans = $(this).find("span");
                    if (spans.first().text() !== "0") {
                        var as = $(this).find("a");
                        var first = as.first();
                        var second = as.eq(1);
                        var user = second[0].text;
                        var link = first[0].href;
                        $.ajax({
                            url: link,
                            type: "GET",
                            async: false, // check one at a time
                            success: function(result){
                                var links = $(result).find("a[href*='/giveaway/']:eq(1)");
                                var next = $(result).find("span:contains('Next')");
                                var curPage = 1;
                                var noNext = (next.length === 0);
                                while (links.length === 0) {
                                    // user has all private giveaways, can't check if they blacklisted you
                                    if (noNext) {
                                        links = undefined;
                                        next = undefined;
                                        noNext = undefined;
                                        curPage = undefined;
                                        return false;
                                    }
                                    curPage++;
                                    $.ajax({
                                        url: link + "/search?page=" + curPage,
                                        type: "GET",
                                        async: false, // check one at a time
                                        success: function(result) {
                                            links = $(result).find("a[href*='/giveaway/']:eq(1)");
                                            next = $(result).find("span:contains('Next')");
                                            noNext = (next.length === 0);
                                            var j;
                                            for (j in result) {
                                                try{
                                                    delete result[j]; // try clearing result
                                                } catch(e) {
                                                    // nothing
                                                }
                                            }
                                        }
                                    });
                                }
                                $.ajax({
                                    url: links[0].href,
                                    type: "GET",
                                    async: false, // check one at a time
                                    success: function(result){
                                        // check if they blacklisted us :(
                                        var blacklistDiv = $(result).find("div[class='table__column--width-fill']:contains('been blacklisted by the giveaway creator')");
                                        if (blacklistDiv.length) {
                                            alert("You have been blacklist by: " + user); // ( Mew2 )
                                            numBlackLists--;
                                            GM_setValue ("numBlackLists", numBlackLists);
                                        }
                                        var i;
                                        for(i in blacklistDiv){ // clear memory
                                            delete blacklistDiv[i];
                                        }
                                        blacklistDiv = undefined;
                                        result = undefined; // does this clear memory?
                                        i = undefined;
                                    }
                                });
                                var i;
                                for(i in links){ // clear memory
                                    delete links[i];
                                }
                                links = undefined;
                                var j;
                                for (j in result) {
                                    try{
                                        delete result[j]; // try clearing result
                                    } catch(e) {
                                        // nothing
                                    }
                                }
                                result = undefined;
                                i = undefined;
                                j = undefined;
                                links = undefined;
                                next = undefined;
                                noNext = undefined;
                                curPage = undefined;
                            }
                        });
                        user = undefined;
                        link = undefined;
                        var i;
                        for(i in first){ // clear memory
                            delete first[i];
                        }
                        first = undefined;
                        var j;
                        for(j in second){ // clear memory
                            delete second[j];
                        }
                        second = undefined;
                        var k;
                        for(k in as){ // clear memory
                            delete as[i];
                        }
                        as = undefined;
                        i = undefined;
                    }
                    var l;
                    for(l in spans){ // clear memory
                        delete spans[l];
                    }
                    spans = undefined;
                    var m;
                    for(m in this){ // clear memory
                        try{
                            delete this[m]; // try clearing result
                        } catch(e) {
                            // nothing
                        }
                    }
                    spans = undefined;
                    l = undefined;
                    m = undefined;
                }
            );
            var i;
            for(i in innerDivs){ // clear memory
                delete innerDivs[i];
            }
            innerDivs = undefined;
            var j;
            for (j in result) {
                try{
                    delete result[j]; // try clearing result
                } catch(e) {
                    // nothing
                }
            }
            result = undefined; // does this clear memory?
            i = undefined;
            j = undefined;
        }
    });
    console.log("Completed Page " + page +", Number of Blacklist(s) left: "+ numBlackLists);
    page++;
    GM_setValue ("SGUserPage", page);
}

alert("All Blacklists have been found!");

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址