您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Put the action list in Microsoft document to right side
// ==UserScript== // @name 微软文档快捷助手 // @namespace https://bathur.cn/ // @version 0.1 // @description Put the action list in Microsoft document to right side // @author Bathur // @match *://docs.microsoft.com/zh-cn/* // @grant none // @create 2020-03-11 // @copyright 2020+, Bathur.cn // @license MIT License // ==/UserScript== (function() { 'use strict'; var rightSide = document.getElementById('affixed-right-container'); if (typeof(rightSide) != "undefined" && rightSide !=null){ var actionList = document.getElementsByClassName('action-list has-flex-justify-content-start has-flex-justify-content-end-tablet is-flex is-flex-row has-flex-wrap has-flex-grow is-unstyled')[0]; var listLenght = actionList.children.length; var hrDivNode = document.createElement('div'); hrDivNode.setAttribute('class', 'has-border-bottom has-padding-bottom-small has-margin-bottom-small'); rightSide.prepend(hrDivNode); for (let index = listLenght - 2; index >= 0; index--) { actionList.children[index].setAttribute('style', 'display: block;'); rightSide.prepend(actionList.children[index]); } } /* document.onkeydown = function(e){ var keyCode = window.event ? e.keyCode : e.which; if(keyCode == 83){ $("#language-toggle").click(); } } */ })();