您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
吾爱破解论坛左侧文章目录移到右边,未使用的时候收起,鼠标移到上面的时候展开,目录较长的时候可以滚动
当前为
// ==UserScript== // @name 吾爱破解论坛左侧文章目录移到右边 // @namespace https://www.52pojie.cn/thread-918614-1-1.html // @version 0.1 // @description 吾爱破解论坛左侧文章目录移到右边,未使用的时候收起,鼠标移到上面的时候展开,目录较长的时候可以滚动 // @author Ganlv // @match https://www.52pojie.cn/* // @icon https://www.52pojie.cn/favicon.ico // @grant none // ==/UserScript== (function () { 'use stricit'; function getOffset( el ) { var _x = 0; var _y = 0; while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) { _x += el.offsetLeft - el.scrollLeft; _y += el.offsetTop - el.scrollTop; el = el.offsetParent; } return { top: _y, left: _x }; } // toc 对象 function Toc(tocElement) { // toc 元素 this.tocElement = tocElement; var matches = this.tocElement.id.match(/^markdown_toc_(\d+)$/); if (!matches) { return null; } // post 元素 this.postId = parseInt(matches[1]); this.postElement = document.getElementById('postmessage_' + this.postId); this.tocElement.className += ' toc-side-right'; this.tocElement.style.maxHeight = (window.innerHeight - 112) + 'px'