您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
切换左右屏幕的时候左侧的内容导航会遮盖内容,此脚本增加一个button,点击button来开启和关闭这个内容导航
当前为
// ==UserScript== // @name shimo.io // @namespace Violentmonkey Scripts // @match https://shimo.im/docs/* // @grant none // @version 0.2 // @description 切换左右屏幕的时候左侧的内容导航会遮盖内容,此脚本增加一个button,点击button来开启和关闭这个内容导航 // ==/UserScript== (function () { "use strict"; setTimeout(function () { // 给内容导航栏加上一个id document.querySelector(".ql-table-of-content").setAttribute("id", "_hidden"); function hidden() { // 根据导航栏当前状态决定是显或隐藏 var el = document.querySelector("#_hidden"); if (el.style.display === 'none') { el.style.display = ''; } else { el.style.display = 'none'; } } // 创建一个开关元素添加到 编辑栏 var node = document.createElement("span"); node.setAttribute("id", "_togo"); node.setAttribute("class", "ql-formats"); node.innerHTML = "<button type='button'>Togo<button>"; node.onclick = hidden; var parent_node = document.querySelector(".ql-toolbar-default") parent_node.insertBefore(node, parent_node.firstElementChild); // }, 2000); })();