Greasy Fork is available in English.
鼠标选中页面中的字符,自动复制进剪贴板
当前为
// ==UserScript==
// @name 选中即复制
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 鼠标选中页面中的字符,自动复制进剪贴板
// @author kakasearch
// @include *://**/*
// @grant GM_setClipboard
// @grant unsafeWindow
// @license MIT
// ==/UserScript==
(function() {
'use strict';
// Your code here..
var text
document.onclick = function() {
if (unsafeWindow.getSelection) {
text = unsafeWindow.getSelection();
} else if (document.selection) {
text = document.selection.createRange();
}
GM_setClipboard(text.toString())
}
})();