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://store.steampowered.com/checkout/*
// @match https://steamcommunity.com/*
// @grant none
// @version 1.2
// @description Automatically checks Steam Subscriber Agreement checkboxes
// @inject-into content
// @run-at document-end
// @license MIT
// ==/UserScript==
(function () {
"use strict";
const keepChecked = function (event) {
if (!this.checked) {
event.preventDefault();
}
};
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", keepChecked);
}
}
})();