Dailyindiegame Extension

em....很弱的脚本.DIG商店自动隐藏无卡及已拥有游戏

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Dailyindiegame Extension
// @namespace    http://tampermonkey.net/
// @description  em....很弱的脚本.DIG商店自动隐藏无卡及已拥有游戏
// @match        *://www.dailyindiegame.com/content*
// @match        *://dailyindiegame.com/content*
// @require      https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js
// @version      20180510
// ==/UserScript==

(function() {
    $(document).ready(function(){
        var gameList,gameNum,gcard,owned,ownapp,digacc;
        gameList = $("tr.DIG3_14_Gray");
        gameNum = gameList.length;
        for(var i=0;i<gameNum;i++){
            gcard = gameList[i].children[2].innerText;
            if(gcard===""){
                $(gameList[i]).hide();
            }
        }
        digacc = $("td.DIG3_14_Orange");
        for(var n=0;n<digacc.length;n++){
            if(digacc[n].innerText===""){
                $(digacc[n]).parent().hide();
            }
        }
        setTimeout(function(){
            owned = $("span[style='color: green; cursor: help;']");
            for(var j=0;j<owned.length;j++){
                ownapp = owned[j].innerText;
                if(ownapp===" ✔"){
                    $(owned[j]).parent().parent().hide();
                }
            }
        //延迟时间
        },4444);
    });
})();