您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
2020/4/27 下午4:53:47
// ==UserScript== // @name Ctlr+鼠标右键复制选中内容 // @namespace Ctrl Right copy // @match *://*/* // @grant GM_setClipboard // @grant GM_notification // @version 1.2 // @author - // @description 2020/4/27 下午4:53:47 // ==/UserScript== document.oncontextmenu = (event) => { if(event.ctrlKey){ event.preventDefault(); const selectText = window.getSelection().toString().replace(/\n+/g, '\n\n'); if (selectText.length) { GM_setClipboard(selectText); GM_notification({ text: selectText, title: '复制到如下内容:', timeout: 2000, }) } } };