您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
将网页一键开启可编辑按钮,选中即可把当前网页当作TXT随意删除修改,注意:仅在编辑完记得关闭,不然部分链接无法点击
当前为
// ==UserScript== // @name 网页文字编辑 // @namespace xuexizuoye.com // @version 1.00 // @description 将网页一键开启可编辑按钮,选中即可把当前网页当作TXT随意删除修改,注意:仅在编辑完记得关闭,不然部分链接无法点击 // @author huansheng // @run-at document-start // @match htt*://*/* // @grant none // ==/UserScript== window.changeCss = function changeCss(){ console.log('当前按钮是否选中:' + document.querySelector("#checkBt").checked) document.body.contentEditable = document.querySelector("#checkBt").checked; } window.changeCss2 = function changeCss2(){ //document.querySelector(".checkBt").innerText = '是否 编辑' } var styledom = document.createElement("style"); styledom.setAttribute("type", "text/css"); styledom.innerHTML = '.checkBt:hover{left:3px;}.checkBt{position:fixed;left:-42px;bottom:8vh;border:1px solid;border-radius:23%;background-color:#6cbd45;color:#fff;padding:5px;z-index:999;' document.querySelector("head").appendChild(styledom); document.body.innerHTML = document.body.innerHTML + '<div class="checkBt" onMouseOver="changeCss()" onMouseOut="changeCss2()"><label for="checkBt"><input type="checkbox" name="editable" id="checkBt">是否 编辑</label></div>'