// ==UserScript== // @name 纯净版boylove.cc // @namespace Violentmonkey Scripts // @match https://boylove.cc/* // @grant none // @version 1.0 // @author - // @description 2024/3/2 11:15:27 // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; /** 去除首页和阅读页广告, 去除首页公告 **/ const ads = document.querySelectorAll('.div_sticky2'); const bottomAds = document.querySelectorAll('.pop_words'); const centerAds = document.querySelectorAll('.huqquynn'); const homeTopAds = [document.querySelector('.row.stui-pannel')]; // 第一个 const homeCenterAds = document.querySelectorAll('.yvznaa_e'); const homeCenterAds2 = document.querySelectorAll('.nxpqasjp'); const homeNotice = document.querySelectorAll('#temp_block_03'); [...ads,...centerAds, ...bottomAds, ...homeTopAds, ...homeCenterAds, ...homeCenterAds2, ...homeNotice].forEach((item)=>{ item && item.remove(); }) /** 去除头部的小商店、影片、游戏 **/ const header = document.querySelector('.stui-header__menu'); const shop = header.children[3]; const movie = header.children[4]; const game = header.children[5]; header.removeChild(shop); header.removeChild(movie); header.removeChild(game); /** 小说页 **/ if(location.pathname.includes('novel')) { window.onload = () => { const noticeHead = document.querySelector('#temp_block > div:nth-child(3)'); const noticeContent = document.querySelector('#temp_block > ul:nth-child(4)'); noticeContent.remove(); noticeHead.remove(); } } })();