您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A plugin to add mobile styling to idle-pixel.com
当前为
// ==UserScript== // @name IdlePixelMobile // @namespace com.evolsoulx.idlepixel.mobile // @version 1.0.5 // @description A plugin to add mobile styling to idle-pixel.com // @author evolsoulx // @license MIT // @match *://idle-pixel.com/login/play* // @grant GM_addStyle // @require https://greasyfork.org/scripts/441206-idlepixel/code/IdlePixel+.js // ==/UserScript== (function() { 'use strict'; function GM_addStyle(css) { const style = document.getElementById("mobilestyles") || (function() { const style = document.createElement('style'); style.type = 'text/css'; style.id = "mobilestyles"; document.head.appendChild(style); return style; })(); const sheet = style.sheet; sheet.insertRule(css, (sheet.rules || sheet.cssRules || []).length); } GM_addStyle(` @media only screen and (max-width: 600px) { #panels{background-color:green !important;} } `); class MobilePlugin extends IdlePixelPlusPlugin { constructor() { super("mobile", { about: { name: GM_info.script.name, version: GM_info.script.version, author: GM_info.script.author, description: GM_info.script.description, grant: GM_info.script.grant }, config: [{ type: "label", label: "Is this a mobile script?" }, { id: "MyCheckbox", label: "Yes / No", type: "boolean", default: true } ] }); } onConfigsChanged() { } onLogin() { console.log("MobilePlugin.onLogin"); } onMessageReceived(data) { // Will spam the console, uncomment if you want to see it //console.log("SamplePlugin.onMessageReceived: ", data); } onVariableSet(key, valueBefore, valueAfter) { // Will spam the console, uncomment if you want to see it //console.log("SamplePlugin.onVariableSet", key, valueBefore, valueAfter); } onChat(data) { // Could spam the console, uncomment if you want to see it //console.log("SamplePlugin.onChat", data); } onPanelChanged(panelBefore, panelAfter) { console.log("MobilePlugin.onPanelChanged", panelBefore, panelAfter); } onCombatStart() { console.log("MobilePlugin.onCombatStart"); } onCombatEnd() { console.log("MobilePlugin.onCombatEnd"); } } const plugin = new MobilePlugin(); IdlePixelPlus.registerPlugin(plugin); })();