summaryrefslogtreecommitdiff
path: root/ext/js/background/backend.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2022-10-15 22:43:12 -0400
committerGitHub <noreply@github.com>2022-10-15 22:43:12 -0400
commit9ef7f9d383561831ab1556f2679593235053a08e (patch)
treea32dd0d18e7f156277e3a887adee889b5f744196 /ext/js/background/backend.js
parenta370b46fae865951da09d5b7d5d5b1a70588d19c (diff)
Clipboard updates (#2254)
* Rename * Rename vars * Refactor paste target * Prevent most CSS url() properties from loading * Add helper function to clear rich function * Add useRichText argument * Update condition for using readText * Fix indent * Update CSS
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r--ext/js/background/backend.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index 197734b1..2154b32a 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -53,7 +53,7 @@ class Backend {
// eslint-disable-next-line no-undef
document: (typeof document === 'object' && document !== null ? document : null),
pasteTargetSelector: '#clipboard-paste-target',
- imagePasteTargetSelector: '#clipboard-image-paste-target'
+ richContentPasteTargetSelector: '#clipboard-rich-content-paste-target'
});
this._clipboardMonitor = new ClipboardMonitor({
japaneseUtil: this._japaneseUtil,
@@ -596,7 +596,7 @@ class Backend {
}
async _onApiClipboardGet() {
- return this._clipboardReader.getText();
+ return this._clipboardReader.getText(false);
}
async _onApiGetDisplayTemplatesHtml() {
@@ -1773,7 +1773,7 @@ class Backend {
try {
if (clipboardDetails !== null && clipboardDetails.text) {
- clipboardText = await this._clipboardReader.getText();
+ clipboardText = await this._clipboardReader.getText(false);
}
} catch (e) {
errors.push(serializeError(e));