mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 01:35:32 +00:00
created javascript modules
This commit is contained in:
12
HaWeb/wwwroot/js/clipboard.mjs
Normal file
12
HaWeb/wwwroot/js/clipboard.mjs
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
export { startup_clipboard };
|
||||
Reference in New Issue
Block a user