您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
content toggle
当前为
// ==UserScript== // @name feishu content toggle // @namespace http://tampermonkey.net/ // @version 2024-08-07 21:25:59 // @description content toggle // @author onionycs // @license MIT // @match *://*.feishu.cn/* // @require http://code.jquery.com/jquery-3.x-git.min.js // @icon https://www.google.com/s2/favicons?sz=64&domain=feishu.cn // @grant none // ==/UserScript== (function() { 'use strict'; /* globals jQuery, $, waitForKeyElements */ // Your code here... // 监听键盘按下事件 document.addEventListener('keydown', function(event) { // 检查按下的键是否是数字0(注意:这里不区分大小写,但数字键通常没有大小写) if (event.key === '[') { let viewportWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth; document.getElementsByClassName("catalogue__pin-wrapper")[0].click(); //false目录为开 setTimeout(function(){ console.error("调整窗口"); if($('.catalogue__pin-wrapper').attr('data-pin')=='false'){ console.error("居中文字"); let a1=viewportWidth*0.6; let a2=viewportWidth*0.3; let a3=viewportWidth*0.1; document.getElementsByClassName("editor")[0].style.width=a1+"px"; document.getElementsByClassName("editor")[0].style.maxWidth=a1+"px"; document.getElementsByClassName("editor")[0].style.marginLeft=a2+"px"; document.getElementsByClassName("editor")[0].style.marginRight=a3+"px"; } else { console.error("文字居左"); let a1=viewportWidth*0.8; let a2=viewportWidth*0.3; let a3=viewportWidth*0.1; document.getElementsByClassName("editor")[0].style.width=a1+"px"; document.getElementsByClassName("editor")[0].style.maxWidth=a1+"px"; document.getElementsByClassName("editor")[0].style.marginLeft=a3+"px"; } },300); } }); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址