您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
为煎蛋jandan.net提供左右方向键快捷翻页、鼠标悬停显示大图、屏蔽指定用户发言等功能
当前为
// ==UserScript== // @name 煎蛋侠 // @name:en Jiandan Hero // @name:zh-TW 煎蛋俠 // @namespace hoothin // @version 0.6 // @description 为煎蛋jandan.net提供左右方向键快捷翻页、鼠标悬停显示大图、屏蔽指定用户发言等功能 // @description:en Tools for jandan.net // @description:zh-TW 為煎蛋jandan.net提供左右方向鍵快捷翻頁、鼠標懸停顯示大圖、屏蔽指定用戶發言等功能 // @author hoothin // @match http*://jandan.net/* // @grant GM_setValue // @grant GM_getValue // @grant GM_deleteValue // ==/UserScript== (function() { 'use strict'; document.addEventListener("keydown", function(e) { if(/INPUT|TEXTAREA/.test(document.activeElement.tagName))return; switch(e.keyCode){ case 37://← var next=document.querySelector("span#nav_next>a"); if(next)next.click(); break; case 39://→ var pre=document.querySelector("span#nav_prev>a"); if(pre)pre.click(); break; } }); var authors=document.querySelectorAll("div.author"),i; for(i=0;i<authors.length;i++){ let author=authors[i]; let authorId=author.querySelector("strong").title.replace(/防伪码:/,""); let changeBtn=document.createElement("a"); changeBtn.href=`javascript:void(0);`; changeBtn.id="changeBtn"; changeBtn.style.display="none"; author.insertBefore(changeBtn,author.querySelector("br")); if(GM_getValue("jandanDis_"+authorId)){ author.nextSibling.nextSibling.style.display="none"; changeBtn.innerHTML="显"; }else{ changeBtn.innerHTML="隐"; } author.onmouseover=function(){ changeBtn.style.display="block"; }; author.onmouseout=function(){ changeBtn.style.display="none"; }; changeBtn.onclick=function(){ var author_s,j,shown; if(author.nextSibling.nextSibling.style.display=="none"){ shown=false; GM_deleteValue("jandanDis_"+authorId); }else{ shown=true; GM_setValue("jandanDis_"+authorId,true); } for(j=0;j<authors.length;j++){ author_s=authors[j]; if(author_s.querySelector("strong").title.replace(/防伪码:/,"")==authorId){ author_s.nextSibling.nextSibling.style.display=shown?"none":"block"; author_s.querySelector("#changeBtn").innerHTML=shown?"显":"隐"; } } }; } var imgs=document.querySelectorAll("img"); var bigImg=document.createElement("img"); bigImg.style.cssText="pointer-events: none;position:fixed;z-index:999"; for(i=0;i<imgs.length;i++){ let img=imgs[i],left,top; img.onmouseover=function(e){ bigImg.src=img.src.replace(/\/s\/custom\//,"/s/medium/").replace(/\.sinaimg\.cn\/mw600/,".sinaimg.cn/large"); document.body.appendChild(bigImg); bigImg.onload=function(){ relocBigImg(left, top); }; }; img.onmouseout=function(e){ document.body.removeChild(bigImg); bigImg.removeAttribute("height"); }; img.onmousemove=function(e){ left=e.clientX; top=e.clientY; if(!bigImg.src || bigImg.src===""){ img.onmouseover(null); } relocBigImg(left, top); }; } function relocBigImg(left, top){ if(bigImg.height>document.documentElement.clientHeight){ bigImg.height=document.documentElement.clientHeight; } if(top+bigImg.height>document.documentElement.clientHeight){ top=document.documentElement.clientHeight-bigImg.height; } if(left+bigImg.width>document.documentElement.clientWidth){ left=document.documentElement.clientWidth-bigImg.width; } bigImg.style.left=left+10+"px"; bigImg.style.top=top+"px"; } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址