您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Minimalistic enhancements for 52pojie.
当前为
// ==UserScript== // @name 52 Enhance // @namespace http://tampermonkey.net/ // @version 0.1 // @description Minimalistic enhancements for 52pojie. // @author PRO // @match https://www.52pojie.cn/* // @icon http://52pojie.cn/favicon.ico // @grant none // @license gpl-3.0 // ==/UserScript== (function() { 'use strict'; function toggleCode() { let code = this.parentNode.parentNode.lastChild; if (code.style.display == "none") { code.style.display = ""; this.textContent = " 隐藏代码"; } else { code.style.display = "none"; this.textContent = " 显示代码"; } } document.querySelectorAll("em.viewsource").forEach(ele => { let hide_code = document.createElement("em"); hide_code.setAttribute("style", ele.getAttribute("style")); hide_code.setAttribute("num", ele.getAttribute("num")); hide_code.textContent = " 隐藏代码"; hide_code.addEventListener("click", toggleCode); ele.parentNode.appendChild(hide_code); }); })();