您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
隐藏图片和标题
当前为
// ==UserScript== // @name noPIC 一键隐藏/显示全页面图片(摸鱼必备) // @version 1.5 // @description 隐藏图片和标题 // @author fxalll // @match *://*/* // @grant none // @require https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js // @license MIT // @namespace http://greasyfork.icu/users/1043548 // ==/UserScript== (function () { window.imgHidenSet = null; window.imgShownSet = null; let imgHiden = function() { $(".RichContent-cover-inner").each(function(){ $(this).hide(); }); $(".ZVideoRecommendationItem-thumbnailImage").each(function(){ $(this).hide(); }); $(".QuestionHeader-title").each(function(){ $(this).hide(); }); $("iframee").each(function(){ $(this).hide(); }); $("img").each(function(){ $(this).hide(); }); }; let imgShown = function() { $(".RichContent-cover-inner").each(function(){ $(this).show(); }); $(".ZVideoRecommendationItem-thumbnailImage").each(function(){ $(this).show(); }); $(".QuestionHeader-title").each(function(){ $(this).show(); }); $("iframee").each(function(){ $(this).show(); }); $("img").each(function(){ $(this).show(); }); }; let handleButtonClick = function(){ if (window.imgHidenSet === null) { clearInterval(window.imgShownSet); window.imgShownSet = null; imgHiden() window.imgHidenSet = setInterval(function(){ imgHiden(); }, 300) } else { clearInterval(window.imgHidenSet); window.imgHidenSet = null; imgShown() window.imgShownSet = setInterval(function(){ imgShown(); }, 300) } } // 自动隐藏图片 //imgHiden(); //window.imgHidenSet = setInterval(function(){ //imgHiden(); //}, 300) let button = document.createElement('div') button.innerText = "<" button.setAttribute("id", "myButton"); button.style.color = "#ffffff40" button.style.padding = "10px 20px" button.style.position = "fixed" button.style.bottom = "20px" button.style.right = "3px" button.style.textAlign = "center" button.style.alignContent = "center" button.style.background = "#7d7d7d33" button.style.borderRadius = "15px" button.style.border = "1px solid #37373745" button.style.cursor = "pointer" button.style.transform = "translateX(30%)" button.style.transition = "0.3s" button.style.zIndex = "99999999999999999999999999999" button.addEventListener("click", handleButtonClick); // 添加鼠标悬停效果 button.addEventListener('mouseover', function() { // 当鼠标悬停在元素上时,改变元素的样式 button.style.boxShadow = "0 0 10px rgba(0, 0, 0, 0.5)"; /* 鼠标悬停时的阴影效果 */; button.style.background = "#4760e1bf" button.style.color = "#ffffff" button.innerText = "图片显隐" button.style.transform = "translateX(0px)" }); button.addEventListener('mouseout', function() { // 当鼠标离开元素时,恢复元素的样式 button.style.boxShadow = ''; button.style.background = "#7d7d7d33" button.style.color = "#ffffff40" button.innerText = "<" button.style.transform = "translateX(30%)" }); document.body.appendChild(button); })()