textselection

This commit is contained in:
Sebastian Titz
2022-07-14 09:40:04 +02:00
parent 240a1f999a
commit 84535957c8
3 changed files with 37 additions and 10 deletions

2
selText.min.js vendored Normal file
View File

@@ -0,0 +1,2 @@
var selText=function(callback){document.body.addEventListener("mouseup",(function(e){var selection;window.getSelection?selection=window.getSelection():document.selection&&(selection=document.selection.createRange()),""!==selection.toString()&&callback(selection.toString(),e.pageX,e.pageY)}))};
//# sourceMappingURL=selText.min.js.map