aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/backend.js
diff options
context:
space:
mode:
authorsiikamiika <siikamiika@users.noreply.github.com>2019-10-27 15:46:27 +0200
committersiikamiika <siikamiika@users.noreply.github.com>2019-10-27 15:46:27 +0200
commit48776145d6bdb8aff82e82546583c790353e75b6 (patch)
tree738b1557aa7362948b7c52e8673fc514858a53a0 /ext/bg/js/backend.js
parentd3f51690f8bb236d1ba3c79c20b3a60d3e62dc52 (diff)
add workaround to Chrome clipboard.readText
For some reason this doesn't work on Firefox, so keep using the new API for Firefox
Diffstat (limited to 'ext/bg/js/backend.js')
-rw-r--r--ext/bg/js/backend.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js
index 23d876f6..7192d026 100644
--- a/ext/bg/js/backend.js
+++ b/ext/bg/js/backend.js
@@ -30,6 +30,8 @@ class Backend {
this.isPreparedResolve = null;
this.isPreparedPromise = new Promise((resolve) => (this.isPreparedResolve = resolve));
+ this.clipboardPasteTarget = document.querySelector('#clipboard-paste-target');
+
this.apiForwarder = new BackendApiForwarder();
}
@@ -187,7 +189,8 @@ Backend.messageHandlers = {
forward: ({action, params}, sender) => apiForward(action, params, sender),
frameInformationGet: (params, sender) => apiFrameInformationGet(sender),
injectStylesheet: ({css}, sender) => apiInjectStylesheet(css, sender),
- getEnvironmentInfo: () => apiGetEnvironmentInfo()
+ getEnvironmentInfo: () => apiGetEnvironmentInfo(),
+ clipboardGet: () => apiClipboardGet()
};
window.yomichan_backend = new Backend();