GAMES4U.ORG Quick Access Button for Steam

Instantly access GAMES4U.ORG for game-related information and resources directly from Steam's purchase section.

スクリプトをインストールするには、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         GAMES4U.ORG Quick Access Button for Steam
// @version      1.0
// @description  Instantly access GAMES4U.ORG for game-related information and resources directly from Steam's purchase section.
// @match        https://store.steampowered.com/app/*
// @icon         https://www.google.com/s2/favicons?domain=steampowered.com
// @grant        GM_xmlhttpRequest
// @homepageURL https://greasyfork.org/en/scripts/511589-games4u-org-quick-access-button-for-steam
// @namespace https://greasyfork.org/users/1290286
// ==/UserScript==

(() => {
    'use strict';

    const headerEl = document.querySelector('.apphub_HeaderStandardTop');
    if (!headerEl) return;

    let itemID = window.location.pathname.split('/')[2];
    let games4uUrl = `https://games4u.org/?s=${itemID}`;

    let el = document.createElement('div');
    el.classList.add('apphub_OtherSiteInfo');
    el.style['margin-left'] = '1rem';

    el.innerHTML = `
    <a class="btnv6_blue_hoverfade btn_medium" href="${games4uUrl}" target="_blank">
        <span>View on GAMES4U.ORG</span>
    </a>
    `;

    const existingEl = document.querySelector('.apphub_OtherSiteInfo');
    if (existingEl) {
        headerEl.insertBefore(el, existingEl);
    } else {
        headerEl.appendChild(el);
    }

})();