您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
tapd文档查看页面优化目录显示
// ==UserScript== // @author YuXianwen // @name Tapd 文档页面查看 // @namespace http://tampermonkey.net/ // @version 0.1.2 // @description tapd文档查看页面优化目录显示 // @match https://www.tapd.cn/59941941/documents/show/* // @icon https://www.google.com/s2/favicons?domain=tapd.cn // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... // 加载样式 var style = document.createElement("style"); style.type = "text/css"; var text = document.createTextNode(`.wiki-toc{ font-size: 14px; } .wiki-toc .category{ display:none} .wiki-toc .content div div { padding:6px 0; } .wiki-toc .content div div:hover{ background-color:#f5f2f2} `); style.appendChild(text); var head = document.getElementsByTagName("head")[0]; head.appendChild(style); console.log('init') $('#toggleCategory').click(); $('.detail-tab-ul').prepend('<li class="detail-tab-li" id="li-wiki-toc"><a rel="wiki-toc-tpl">目录</a></li>') var doc = $('.wiki-toc').clone() $('.wiki-toc').hide() var script=$('<script id="wiki-toc-tpl" type="text/html">这是目录<\/script>'); $('body').append(script); $('#li-wiki-toc').on('click',function(){ $("#detail-content").html(doc) }) setTimeout(function(){ $('#li-wiki-toc').click(); $('.fd-comments').hide() }) })();