您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
本脚本用于精易论坛去除全站广告
// ==UserScript== // @icon http://www.fanlisky.cn/favicon.ico // @name 精易论坛去除全站广告 // @namespace http://tampermonkey.net/ // @version 0.3 // @description 本脚本用于精易论坛去除全站广告 // @author LiGe // @match *://*.125.la/* // @grant none // @email [email protected] // @run-at document-end // ==/UserScript== var bbs = "https://bbs.125.la/"; //精易的地址 (function() { 'use strict'; var currentUrl = window.location.href; if(currentUrl.includes(bbs)){ //中部广告 var centerElement = document.getElementsByClassName("wp a_t")[0]; //头部广告 var headAD = document.getElementsByClassName("wp a_h")[0]; //帖子上部广告 var formContent = document.getElementsByClassName("ptn xg2")[0]; //页脚广告 var footerAD = document.getElementsByClassName("wp a_f")[0]; if(footerAD!==null && typeof(footerAD)!="undefined"){ footerAD.remove(); } if(centerElement!==null && typeof(centerElement)!="undefined"){ centerElement.remove(); } if(formContent!==null && typeof(formContent)!="undefined"){ formContent.remove(); } if(headAD!==null && typeof(headAD)!="undefined"){ headAD.remove(); } //删除帖子内页小广告 for(let i = 0;i <= 10 ;i++){ var tieAD = document.getElementsByClassName("a_pt")[i]; if(tieAD!==null && typeof(tieAD)!="undefined"){ tieAD.remove(); i--; } } } })();