Steam: Automatically check Subscriber Agreement checkboxes

Automatically checks Steam Subscriber Agreement checkboxes

当前为 2022-02-01 提交的版本,查看 最新版本

// ==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);
		}
	}
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址