您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds link to PCGW on game detail page.
// ==UserScript== // @name ProtonDB: link to PCGamingWiki // @version 1 // @grant none // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js // @match https://www.protondb.com/* // @author monnef // @description Adds link to PCGW on game detail page. // @namespace monnef.eu // ==/UserScript== const cls = 'pcgw-link'; const work = () => { const ghEl = $('.content > div > div > a:contains(Github Issue Search)'); if(!ghEl.length) { return; } if(ghEl.parent().find(`.${cls}`).length) { return; } const gameName = ghEl.parent().parent().children().first().text(); const linkAddr = `https://pcgamingwiki.com/w/index.php?search=${gameName}`; ghEl.clone().attr('href', linkAddr).text('PCGamingWiki').addClass(cls).insertAfter(ghEl); }; $(() => setInterval(work, 1000));