// ==UserScript== // @name vndb优先显示title // @namespace http://tampermonkey.net/ // @version 1.0.0 // @description 将显示的值与悬停提示相互替换 // @author aotmd // @match https://vndb.org/* // @noframes // @license MIT // @grant none // @downloadURL none // ==/UserScript== (function () { addLoadEvent(() => { window.setTimeout(() => { let 排除列表=['Posted in VNDB discussions','Posted in Announcements','Posted in Visual novels','Review'] let list=document.querySelectorAll("a"); for(var i=0;i{ return list[i].getAttribute("title").indexOf(item)!=-1; }) if(flag){ continue; } let temp=list[i].getAttribute("title"); list[i].setAttribute("title",list[i].innerText.trim()); list[i].innerText=temp; } } }, 0); }); /** * 添加浏览器执行事件 * @param func 无参匿名函数 */ function addLoadEvent(func) { let oldOnload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function () { try { oldOnload(); } catch (e) { console.log(e); } finally { func(); } } } } })();