您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Удаляет в моб. версии боя при просмотре боя кнопку `вернуться назад` и `вернуться на страницу героя`
当前为
// ==UserScript== // @name useless_buttons // @namespace http://tampermonkey.net/ // @version 0.1.1 // @description Удаляет в моб. версии боя при просмотре боя кнопку `вернуться назад` и `вернуться на страницу героя` // @author Something begins // @license University of Sugma // @match https://www.heroeswm.ru/war* // @match https://my.lordswm.com/war* // @match https://www.lordswm.com/war* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant unsafeWindow // ==/UserScript== function observeDisplay(el){ const observer = new MutationObserver((mutationsList) => { console.log("activated"); for (const mutation of mutationsList) { if (mutation.type === "attributes" && mutation.attributeName === "style" && el.style.display !== "none") { el.style.display = "none"; } } }); observer.observe(el, { attributes: true, attributeFilter: ["style"] }); } const mobileInterval = setInterval(() => { if ([typeof android, typeof iOS].includes("undefined")) return; clearInterval(mobileInterval); if (!android && !iOS) return; const buttonsLoadedInterval = setInterval(()=>{ ["back_to_game", "back_to_home"].forEach(selector=>{ const el = document.querySelector("#"+selector); if (el) { el.style.display = "none"; console.log("get nonned"); observeDisplay(el); clearInterval(buttonsLoadedInterval); } }) }, 100); }, 100);