SteamGifts - Train Opener

Opens all train giveaways in new tabs

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         SteamGifts - Train Opener
// @namespace    Royalgamer06
// @version      1.0
// @description  Opens all train giveaways in new tabs
// @author       Royalgamer06
// @include      /^https://www.steamgifts.com/giveaway/.+$/
// @require      http://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.js
// ==/UserScript==

this.$ = this.jQuery = jQuery.noConflict(true);
$(document).ready(function() {
    $("a[href*='/giveaway/']:contains('next'), a[href*='/giveaway/']:contains('Next'), a[href*='/giveaway/']:contains('NEXT'), a[href*='/giveaway/']:contains('>'), a[href*='/giveaway/']:contains('>>'), a[href*='/giveaway/']:contains('>>>'), a[href*='/giveaway/']:contains('->'), a[href*='/giveaway/']:contains('=>')").each(function() {
        var link = this.href;
        var visited = localStorage.getItem("visited_giveaways") ? localStorage.getItem("visited_giveaways").split(",") : [];
        if ($.inArray(link, visited) == -1) {
            window.open(link, "_blank");
            visited.push(link);
            localStorage.setItem("visited_giveaways", visited.join(","));
        }
    });
});