您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
编程猫反帖子劫持脚本
// ==UserScript== // @name 编程猫反劫持脚本 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 编程猫反帖子劫持脚本 // @author Natriumchlorid // @match https://shequ.codemao.cn/community/* // @icon https://shequ.codemao.cn/favicon.ico // @grant none // @license MIT // ==/UserScript== (async function() { for(let k=0;k<100;k++){document.querySelectorAll("iframe").forEach(v=>{ if(v.style.cssText=="position: fixed; left: 0px; top: 0px; width: 100%; height: 100vh; z-index: 100 !important;"){ alert(`移除了一条指向${v.src}的劫持Iframe`); v.remove(); }; });await sleep(100);} async function sleep(ms){ return new Promise((resolve)=>{setTimeout(()=>{resolve()},ms)}); } })();