您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
dominion.games の卓設定を自動的に設定します。
当前为
// ==UserScript== // @name dominion.games Auto Table Setter // @namespace https://tampermonkey.net/ // @version 0.3.1 // @description dominion.games の卓設定を自動的に設定します。 // @author SlashNephy <[email protected]> // @match https://dominion.games/ // @license MIT license // @grant none // @icon https://www.google.com/s2/favicons?sz=64&domain=dominion.games // ==/UserScript== const updateSettings = () => { document.querySelector('button[ng-click="$ctrl.switchView()"]')?.click() document.querySelector('input[ng-model="$ctrl.tableRules.useVPCounter"]')?.click() document.querySelector('button[ng-click="$ctrl.showKingdomSelection()"]')?.click() for (const element of document.querySelectorAll('input.expansion-checkbox')) { element.click() } for (let i = 0; i < 2; i++) { document.querySelector('three-valued-button[ng-model="kc.kingdom.colonies"] button')?.click() document.querySelector('three-valued-button[ng-model="kc.kingdom.shelters"] button')?.click() } for (let i = 0; i < 2; i++) { document.querySelector('div[ng-click="$ctrl.addNewSlot()"]')?.click() } for (let i = 0; i < 2; i++) { document.querySelector('div[ng-if="$ctrl.canBeNothing()"]')?.click() } for (const element of document.querySelectorAll('div.landscape-type-text.type-W')) { element.click() } document.querySelector('input[ng-click="kc.close()"]')?.click() alert('Table settings applied!') } const observe = () => { const target = document.querySelector('div.window-container > div') if (target === null) { setTimeout(observe, 1000) return } let updated = false const observer = new MutationObserver((records) => { const r = records[0] console.log(r) if (r.target && r.target instanceof Element && r.target.classList.contains('my-table') && !updated) { updateSettings() updated = true } else if (r.target && r.target instanceof Element && r.target.classList.contains('new-table') && updated) { updated = false } }) observer.observe(target, { attributes: true, attributeFilter: ['class'], }) } window.addEventListener('load', observe)
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址