Last active
April 13, 2020 14:43
-
-
Save bigfang/d49d1e71008f7dfd51a50be0b8b8bcf0 to your computer and use it in GitHub Desktop.
Revisions
-
bigfang renamed this gist
Apr 13, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
bigfang revised this gist
Jul 27, 2019 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ // ==UserScript== // @name autocopy // @namespace https://bigfang.github.io // @description Auto copy selected text // @match *://*/* // @run-at document-end @@ -11,7 +11,7 @@ if (typeof GM_setClipboard != 'function') alert('Your UserScript client has no G document.addEventListener('mouseup', (e) => { if (e.button != 0 || ['INPUT', 'TEXTAREA'].includes(e.target.tagName)) return; let stext = getSelection().toString(); if (stext) { -
bigfang revised this gist
Jul 13, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,8 @@ if (typeof GM_setClipboard != 'function') alert('Your UserScript client has no G document.addEventListener('mouseup', (e) => { if (e.button != 0 || e.target.tagName === 'INPUT') return; let stext = getSelection().toString(); if (stext) { GM_setClipboard(stext) -
bigfang created this gist
Jul 12, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ // ==UserScript== // @name autocopy // @namespace https://bigfang.net // @description Auto copy selected text // @match *://*/* // @run-at document-end // @grant GM_setClipboard // ==/UserScript== if (typeof GM_setClipboard != 'function') alert('Your UserScript client has no GM_setClipboard support'); document.addEventListener('mouseup', (e) => { if (e.button != 0) return; let stext = getSelection().toString(); if (stext) { GM_setClipboard(stext) } }, false);