diff --git a/static/koboldai.js b/static/koboldai.js index 6fa4abbe..56878119 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -2321,19 +2321,16 @@ function retry_from_here() { } } -function push_to_clipboard() { - navigator.permissions.query({name: "clipboard-write"}).then((result) => { - if (result.state === "granted" || result.state === "prompt") { - navigator.clipboard.writeText(getSelectionText()); - } - }); +function copy() { + document.execCommand("copy") } -function push_from_clipboard(el = document.activeElement) { - const [start, end] = [el.selectionStart, el.selectionEnd]; - navigator.clipboard.readText().then( - (clipText) => el.setRangeText(clipText, start, end, 'select')); - +function paste() { + document.execCommand("paste") +} + +function cut() { + document.execCommand("cut") } function getSelectionText() {