diff options
Diffstat (limited to 'ext/bg/js/api.js')
| -rw-r--r-- | ext/bg/js/api.js | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js index 999ea337..88eef431 100644 --- a/ext/bg/js/api.js +++ b/ext/bg/js/api.js @@ -401,3 +401,11 @@ async function apiFocusTab(tab) {          // Edge throws exception for no reason here.      }  } + +async function apiClipboardGet() { +    const clipboardPasteTarget = utilBackend().clipboardPasteTarget; +    clipboardPasteTarget.innerText = ''; +    clipboardPasteTarget.focus(); +    document.execCommand('paste'); +    return clipboardPasteTarget.innerText; +} |