您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically checks Steam Subscriber Agreement checkboxes
当前为
// ==UserScript== // @name Steam: Automatically check Subscriber Agreement checkboxes // @namespace zo8dd7kkrrnquyxs5yd2 // @match https://store.steampowered.com/account/registerkey* // @match https://steamcommunity.com/* // @grant none // @version 1.0 // @description Automatically checks Steam Subscriber Agreement checkboxes // @inject-into content // @run-at document-end // @license MIT // ==/UserScript== (function () { "use strict"; function run(unwrap = (x)=>x, exporter = (f)=>f) { const realCheckboxGetter = Reflect.getOwnPropertyDescriptor(unwrap(window.HTMLInputElement.prototype), "checked").get; const blockEvent = (event) => { event.preventDefault(); }; const nop = exporter(() => {}); const chocolates = ["accept_ssa", "market_sell_dialog_accept_ssa", "market_buyorder_dialog_accept_ssa"]; for (let box of chocolates) { box = document.getElementById(box); if (box?.type === "checkbox") { box.checked = true; box.addEventListener("click", blockEvent); Reflect.defineProperty(unwrap(box), "checked", { enumerable: false, get: realCheckboxGetter, set: nop }); } } } if (typeof globalThis.XPCNativeWrapper === "function") { // Firefox sandbox run(XPCNativeWrapper.unwrap, (f) => exportFunction(f, window)); } else { // Chrome, just inject const script = document.createElement("script"); script.text = `"use strict";(${run})();`; (document.head ?? document.documentElement).prepend(script); script.remove(); } })();