您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Click event boxes when they appear.
// ==UserScript== // @name Event Item Clicker // @namespace Marascripts // @description Click event boxes when they appear. // @author marascripts // @version 1.0.2 // @grant GM.setValue // @grant GM.getValue // @match https://www.marapets.com/* // @match https://www.marapets.com/pumpkin.php* // @homepageURL https://github.com/marascript/userscripts // @supportURL https://github.com/marascript/userscripts/issues // @license MIT // ==/UserScript== ;(async () => { 'use strict' const clickedItems = await GM.getValue('clicked', 0) const boxToClick = document.querySelector('.birthdayeventbox a') ? document.querySelector('.birthdayeventbox a') : document.querySelector('.pumpkineventbox a') if (boxToClick) { GM.setValue('clicked', clickedItems + 1) window.open( boxToClick.href, 'eventitem', 'width=100,height=100,top=0,left=0,resizable=no' ) } function showCount() { const bigImage = document.querySelector('.mainfeature_art') const span = document.createElement('h2') span.innerText = `You have found ${clickedItems} items` bigImage.appendChild(span) } // TODO: Add birthday if (location.pathname === '/pumpkin.php') { showCount() } })()