mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 09:45:32 +00:00
JavaScript Refactor p1
This commit is contained in:
@@ -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();
|
||||
Reference in New Issue
Block a user