JavaScript Refactor p1

This commit is contained in:
Simon-Martens
2024-01-25 13:41:44 +01:00
parent d386e8ad49
commit 3921f907fb
15 changed files with 723 additions and 769 deletions

View File

@@ -1,7 +1,13 @@
document.addEventListener('copy', function(e){
const startup_clipboard = function () {
document.addEventListener('copy', function (e) {
var e = navigator.clipboard.read();
var text = window.getSelection().toString();
e.clipboardData.setData('text/plain', text);
e.preventDefault();
});
});
}
startup_clipboard();