您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
overleaf line-wrap toggle for overleaf.com
// ==UserScript== // @name Overleaf customisation. // @namespace http://tampermonkey.net/ // @version 0.1 // @description overleaf line-wrap toggle for overleaf.com // @author You // @match https://www.overleaf.com/project/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; setTimeout(function () { var toolbar = document.querySelector('div.toolbar-editor > div.toolbar-right'); var element = document.createElement('A'); element.textContent = 'Toggle wrap'; element.onclick = function() { var editor = document.querySelector('.ace-editor-body'); let session = ace.edit(editor).getSession(); session.setUseWrapMode(!session.$useWrapMode) }; toolbar.insertBefore(element, toolbar.children[0]); }, 3000); })();