您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
12/13/2024, 9:41:45 PM
当前为
// ==UserScript== // @name SteamGifts Region Helper // @namespace Violentmonkey Scripts // @match https://www.steamgifts.com/giveaway/*/region-restrictions* // @match https://www.steamgifts.com/giveaways/new // @grant none // @version 1.0 // @author Lex // @description 12/13/2024, 9:41:45 PM // @license MIT // ==/UserScript== function regionRestrictionsPage() { const countryCodes = $("p.table__column__heading") .map((_, el) => $(el).text()) .map((_, el) => el.match(/\((\w{2})\)/)?.[1]) .get() .filter(code => code !== null) .join(" "); const textBox = $("<input>", { type: "text", value: countryCodes }); const parentElement = $($(".page__heading")[0]); parentElement.after(textBox); } const inputTextBox = $("<input>", { type: "text", value: "" }); function applyGiveaways() { console.log("applyGiveaways"); const list = inputTextBox.val(); const arr = list.split(" "); for (i = 0; i < arr.length; i++) { $("div[data-input='country_item_string'] > div") .each(function() { const name = $(this).data("name"); if (name.substr(name.length-2) == arr[i]) $(this).click() }); } } function newGiveawayPage() { const container = $("<div>", { style: "display: block; width: 100%" }); container.append(inputTextBox); const applyButton = $("<button>", { type: "button", text: "Apply" }).on("click", applyGiveaways); container.append(applyButton); const parentElement = $($(".form_list[data-input='country_item_string']")[0]); parentElement.after(container); } if (window.location.href.includes("region-restrictions")) { regionRestrictionsPage(); } else { newGiveawayPage(); }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址