您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
屏蔽不必要的元素,优化页面浏览体验。
当前为
// ==UserScript== // @name SimpleZK8 // @namespace http://tampermonkey.net/ // @version 1.0 // @description 屏蔽不必要的元素,优化页面浏览体验。 // @author StayExploring // @match http://www.zuanke8.com/* // @grant none // @license MIT // @icon none // ==/UserScript== (function() { // 隐藏 #nv 元素 var nvElement = document.getElementById('nv'); if (nvElement) { nvElement.style.display = 'none'; console.log('#nv 元素已隐藏。'); } // 隐藏 logo 的 <h2> 元素 var logoElement = document.querySelector('h2 > a[title="赚客吧"]'); if (logoElement) { var h2Element = logoElement.closest('h2'); if (h2Element) { h2Element.style.display = 'none'; console.log('Logo 元素已隐藏。'); } } // 隐藏包含搜索框的 <tr> 元素 var searchTrElement = document.querySelector('tr'); if (searchTrElement && searchTrElement.querySelector('.scbar_txt_td')) { searchTrElement.style.display = 'none'; console.log('搜索框的 <tr> 元素已隐藏。'); } // 隐藏整个搜索框的 <div id="scbar"> 元素 var scbarElement = document.getElementById('scbar'); if (scbarElement) { scbarElement.style.display = 'none'; console.log('整个搜索框的 <div id="scbar"> 元素已隐藏。'); } // 隐藏 <div class="wp a_t"> 元素 var wpATElement = document.querySelector('div.wp.a_t'); if (wpATElement) { wpATElement.style.display = 'none'; console.log('包含求助和其他链接的 <div class="wp a_t"> 元素已隐藏。'); } // 隐藏 #xad_mu 元素 var xadMuElement = document.getElementById('xad_mu'); if (xadMuElement) { xadMuElement.style.display = 'none'; console.log('#xad_mu 元素已隐藏。'); } // 隐藏 推荐阅读的 <table> 元素 var recommendedTable = document.querySelector('table.dt.valt'); if (recommendedTable) { recommendedTable.style.display = 'none'; console.log('推荐阅读的 <table> 元素已隐藏。'); } // 隐藏广告区域 <div class="zuanpw zuanat"> 元素 var zuanpwElement = document.querySelector('div.zuanpw.zuanat'); if (zuanpwElement) { zuanpwElement.style.display = 'none'; console.log('广告区域的 <div class="zuanpw zuanat"> 元素已隐藏。'); } // 隐藏 今日热门帖子推荐 <td class="plc plm"> 元素及其内容 var hmElement = document.querySelector('td.plc.plm'); if (hmElement) { hmElement.style.display = 'none'; console.log('今日热门帖子推荐的 <td class="plc plm"> 元素已隐藏。'); } // 隐藏所有头像元素 var avatarElements = document.querySelectorAll('.avatar'); avatarElements.forEach(function(avatarElement) { avatarElement.style.display = 'none'; console.log('头像元素已隐藏。'); }); // 隐藏 <div class="bm bml pbn"> 元素 var bmElement = document.querySelector('div.bm.bml.pbn'); if (bmElement) { bmElement.style.display = 'none'; console.log('<div class="bm bml pbn"> 元素已隐藏。'); } // 隐藏 <tbody id="stickthread_8268000"> 元素 var stickThreadElement = document.getElementById('stickthread_8268000'); if (stickThreadElement) { stickThreadElement.style.display = 'none'; console.log('<tbody id="stickthread_8268000"> 元素已隐藏。'); } // 隐藏 <tbody id="stickthread_8831116"> 元素 var stickThread8831116Element = document.getElementById('stickthread_8831116'); if (stickThread8831116Element) { stickThread8831116Element.style.display = 'none'; console.log('<tbody id="stickthread_8831116"> 元素已隐藏。'); } })();