}
diff --git a/ext/js/display/display.js b/ext/js/display/display.js
index e1080d766b..97b29bbd78 100644
--- a/ext/js/display/display.js
+++ b/ext/js/display/display.js
@@ -1889,7 +1889,7 @@ export class Display extends EventDispatcher {
/** @type {string} */
let text;
try {
- text = await this.invokeContentOrigin('frontendGetSelectionText', void 0);
+ text = await this.invokeContentOrigin('frontendGetPopupSelectionText', void 0);
} catch (e) {
break;
}
diff --git a/ext/js/templates/template-renderer-media-provider.js b/ext/js/templates/template-renderer-media-provider.js
index 28b9c7f35b..6abfae87bd 100644
--- a/ext/js/templates/template-renderer-media-provider.js
+++ b/ext/js/templates/template-renderer-media-provider.js
@@ -101,7 +101,7 @@ export class TemplateRendererMediaProvider {
case 'screenshot': return this._getSimpleMediaData(media, 'screenshot');
case 'clipboardImage': return this._getSimpleMediaData(media, 'clipboardImage');
case 'clipboardText': return this._getSimpleMediaData(media, 'clipboardText');
- case 'selectionText': return this._getSimpleMediaData(media, 'selectionText');
+ case 'popupSelectionText': return this._getSimpleMediaData(media, 'popupSelectionText');
case 'textFurigana': return this._getTextFurigana(media, args[1], namedArgs);
case 'dictionaryMedia': return this._getDictionaryMedia(media, args[1], namedArgs);
default: return null;
diff --git a/ext/settings.html b/ext/settings.html
index 1bca52f925..dd6321e9ae 100644
--- a/ext/settings.html
+++ b/ext/settings.html
@@ -3300,7 +3300,7 @@ or click here to upload
The full search query shown on the search page. |
- {selection-text} |
+ {popup-selection-text} |
The selected text on the search page or popup. |
diff --git a/test/data/anki-note-builder-test-results.json b/test/data/anki-note-builder-test-results.json
index 3516276a9a..212cf2c2ca 100644
--- a/test/data/anki-note-builder-test-results.json
+++ b/test/data/anki-note-builder-test-results.json
@@ -22,7 +22,7 @@
"onyomi-hiragana": "だ, だあす",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"stroke-count": "Stroke count: Unknown",
@@ -54,7 +54,7 @@
"onyomi-hiragana": "",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix込cloze-suffix",
"sentence-furigana": "cloze-prefix込cloze-suffix",
"stroke-count": "Stroke count: Unknown",
@@ -105,7 +105,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "n",
@@ -146,7 +146,7 @@
"reading": "ダース",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "abbr, n",
@@ -192,7 +192,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打つcloze-suffix",
"sentence-furigana": "cloze-prefix打つcloze-suffix",
"tags": "vt",
@@ -233,7 +233,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打つcloze-suffix",
"sentence-furigana": "cloze-prefix打つcloze-suffix",
"tags": "vt",
@@ -274,7 +274,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打つcloze-suffix",
"sentence-furigana": "cloze-prefix打つcloze-suffix",
"tags": "vt",
@@ -315,7 +315,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打つcloze-suffix",
"sentence-furigana": "cloze-prefix打つcloze-suffix",
"tags": "vt",
@@ -356,7 +356,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "n",
@@ -397,7 +397,7 @@
"reading": "ダース",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "abbr, n",
@@ -443,7 +443,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込むcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込むcloze-suffix",
"tags": "vt",
@@ -484,7 +484,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込むcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込むcloze-suffix",
"tags": "vt",
@@ -525,7 +525,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込むcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込むcloze-suffix",
"tags": "vt",
@@ -566,7 +566,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込むcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込むcloze-suffix",
"tags": "vt",
@@ -607,7 +607,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -648,7 +648,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -689,7 +689,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -730,7 +730,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -771,7 +771,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "n",
@@ -812,7 +812,7 @@
"reading": "ダース",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "abbr, n",
@@ -858,7 +858,7 @@
"reading": "がぞう",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix画像cloze-suffix",
"sentence-furigana": "cloze-prefix画像cloze-suffix",
"tags": "n",
@@ -904,7 +904,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixだcloze-suffix",
"sentence-furigana": "cloze-prefixだcloze-suffix",
"tags": "n",
@@ -950,7 +950,7 @@
"reading": "ダース",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixダースcloze-suffix",
"sentence-furigana": "cloze-prefixダースcloze-suffix",
"tags": "abbr, n",
@@ -991,7 +991,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixダcloze-suffix",
"sentence-furigana": "cloze-prefixダcloze-suffix",
"tags": "n",
@@ -1037,7 +1037,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixうつcloze-suffix",
"sentence-furigana": "cloze-prefixうつcloze-suffix",
"tags": "vt",
@@ -1078,7 +1078,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixうつcloze-suffix",
"sentence-furigana": "cloze-prefixうつcloze-suffix",
"tags": "vt",
@@ -1124,7 +1124,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixぶつcloze-suffix",
"sentence-furigana": "cloze-prefixぶつcloze-suffix",
"tags": "vt",
@@ -1165,7 +1165,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixぶつcloze-suffix",
"sentence-furigana": "cloze-prefixぶつcloze-suffix",
"tags": "vt",
@@ -1211,7 +1211,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixうちこむcloze-suffix",
"sentence-furigana": "cloze-prefixうちこむcloze-suffix",
"tags": "vt",
@@ -1252,7 +1252,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixうちこむcloze-suffix",
"sentence-furigana": "cloze-prefixうちこむcloze-suffix",
"tags": "vt",
@@ -1293,7 +1293,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixうちcloze-suffix",
"sentence-furigana": "cloze-prefixうちcloze-suffix",
"tags": "vt",
@@ -1334,7 +1334,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixうちcloze-suffix",
"sentence-furigana": "cloze-prefixうちcloze-suffix",
"tags": "vt",
@@ -1380,7 +1380,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixぶちこむcloze-suffix",
"sentence-furigana": "cloze-prefixぶちこむcloze-suffix",
"tags": "vt",
@@ -1421,7 +1421,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixぶちこむcloze-suffix",
"sentence-furigana": "cloze-prefixぶちこむcloze-suffix",
"tags": "vt",
@@ -1462,7 +1462,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixぶちcloze-suffix",
"sentence-furigana": "cloze-prefixぶちcloze-suffix",
"tags": "vt",
@@ -1503,7 +1503,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixぶちcloze-suffix",
"sentence-furigana": "cloze-prefixぶちcloze-suffix",
"tags": "vt",
@@ -1549,7 +1549,7 @@
"reading": "がぞう",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixがぞうcloze-suffix",
"sentence-furigana": "cloze-prefixがぞうcloze-suffix",
"tags": "n",
@@ -1607,7 +1607,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込むcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込むcloze-suffix",
"tags": "vt",
@@ -1648,7 +1648,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込むcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込むcloze-suffix",
"tags": "vt",
@@ -1689,7 +1689,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -1730,7 +1730,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -1771,7 +1771,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "n",
@@ -1812,7 +1812,7 @@
"reading": "ダース",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "abbr, n",
@@ -1858,7 +1858,7 @@
"reading": "うちこむ、ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込むcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込むcloze-suffix",
"tags": "vt",
@@ -1899,7 +1899,7 @@
"reading": "うつ、ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -1940,7 +1940,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "n",
@@ -1981,7 +1981,7 @@
"reading": "ダース",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "abbr, n",
@@ -2027,7 +2027,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込んでいませんでしたcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込んでいませんでしたcloze-suffix",
"tags": "vt",
@@ -2068,7 +2068,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込んでいませんでしたcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込んでいませんでしたcloze-suffix",
"tags": "vt",
@@ -2109,7 +2109,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込んでいませんでしたcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込んでいませんでしたcloze-suffix",
"tags": "vt",
@@ -2150,7 +2150,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ち込んでいませんでしたcloze-suffix",
"sentence-furigana": "cloze-prefix打ち込んでいませんでしたcloze-suffix",
"tags": "vt",
@@ -2191,7 +2191,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -2232,7 +2232,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -2273,7 +2273,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -2314,7 +2314,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打ちcloze-suffix",
"sentence-furigana": "cloze-prefix打ちcloze-suffix",
"tags": "vt",
@@ -2355,7 +2355,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "n",
@@ -2396,7 +2396,7 @@
"reading": "ダース",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打cloze-suffix",
"sentence-furigana": "cloze-prefix打cloze-suffix",
"tags": "abbr, n",
@@ -2442,7 +2442,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)ち込(こ)むcloze-suffix",
"sentence-furigana": "cloze-prefix打(う)ち込(こ)むcloze-suffix",
"tags": "vt",
@@ -2483,7 +2483,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)ち込(こ)むcloze-suffix",
"sentence-furigana": "cloze-prefix打(う)ち込(こ)むcloze-suffix",
"tags": "vt",
@@ -2524,7 +2524,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)ち込(こ)むcloze-suffix",
"sentence-furigana": "cloze-prefix打(う)ち込(こ)むcloze-suffix",
"tags": "vt",
@@ -2565,7 +2565,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)ち込(こ)むcloze-suffix",
"sentence-furigana": "cloze-prefix打(う)ち込(こ)むcloze-suffix",
"tags": "vt",
@@ -2606,7 +2606,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)ちcloze-suffix",
"sentence-furigana": "cloze-prefix打(う)ちcloze-suffix",
"tags": "vt",
@@ -2647,7 +2647,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)ちcloze-suffix",
"sentence-furigana": "cloze-prefix打(う)ちcloze-suffix",
"tags": "vt",
@@ -2688,7 +2688,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)ちcloze-suffix",
"sentence-furigana": "cloze-prefix打(う)ちcloze-suffix",
"tags": "vt",
@@ -2729,7 +2729,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)ちcloze-suffix",
"sentence-furigana": "cloze-prefix打(う)ちcloze-suffix",
"tags": "vt",
@@ -2770,7 +2770,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)cloze-suffix",
"sentence-furigana": "cloze-prefix打(う)cloze-suffix",
"tags": "n",
@@ -2811,7 +2811,7 @@
"reading": "ダース",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix打(う)cloze-suffix",
"sentence-furigana": "cloze-prefix打(う)cloze-suffix",
"tags": "abbr, n",
@@ -2857,7 +2857,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)(ち)(込)(む)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)(ち)(込)(む)cloze-suffix",
"tags": "vt",
@@ -2898,7 +2898,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)(ち)(込)(む)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)(ち)(込)(む)cloze-suffix",
"tags": "vt",
@@ -2939,7 +2939,7 @@
"reading": "うちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)(ち)(込)(む)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)(ち)(込)(む)cloze-suffix",
"tags": "vt",
@@ -2980,7 +2980,7 @@
"reading": "ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)(ち)(込)(む)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)(ち)(込)(む)cloze-suffix",
"tags": "vt",
@@ -3021,7 +3021,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)(ち)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)(ち)cloze-suffix",
"tags": "vt",
@@ -3062,7 +3062,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)(ち)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)(ち)cloze-suffix",
"tags": "vt",
@@ -3103,7 +3103,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)(ち)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)(ち)cloze-suffix",
"tags": "vt",
@@ -3144,7 +3144,7 @@
"reading": "ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)(ち)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)(ち)cloze-suffix",
"tags": "vt",
@@ -3185,7 +3185,7 @@
"reading": "だ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)cloze-suffix",
"tags": "n",
@@ -3226,7 +3226,7 @@
"reading": "ダース",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix(打)cloze-suffix",
"sentence-furigana": "cloze-prefix(打)cloze-suffix",
"tags": "abbr, n",
@@ -3272,7 +3272,7 @@
"reading": "よむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixtestcloze-suffix",
"sentence-furigana": "cloze-prefixtestcloze-suffix",
"tags": "vt",
@@ -3318,7 +3318,7 @@
"reading": "つよみ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixつtestcloze-suffix",
"sentence-furigana": "cloze-prefixつtestcloze-suffix",
"tags": "n",
@@ -3364,7 +3364,7 @@
"reading": "よむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixtestましたcloze-suffix",
"sentence-furigana": "cloze-prefixtestましたcloze-suffix",
"tags": "vt",
@@ -3410,7 +3410,7 @@
"reading": "うちこむ、ぶちこむ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixうちこむcloze-suffix",
"sentence-furigana": "cloze-prefixうちこむcloze-suffix",
"tags": "vt",
@@ -3451,7 +3451,7 @@
"reading": "うつ、ぶつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixうちcloze-suffix",
"sentence-furigana": "cloze-prefixうちcloze-suffix",
"tags": "vt",
@@ -3497,7 +3497,7 @@
"reading": "おてまえ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixお手前cloze-suffix",
"sentence-furigana": "cloze-prefixお手前cloze-suffix",
"tags": "n",
@@ -3543,7 +3543,7 @@
"reading": "ばんごう",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix番号cloze-suffix",
"sentence-furigana": "cloze-prefix番号cloze-suffix",
"tags": "n",
@@ -3589,7 +3589,7 @@
"reading": "ちゅうごし",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix中腰cloze-suffix",
"sentence-furigana": "cloze-prefix中腰cloze-suffix",
"tags": "n",
@@ -3635,7 +3635,7 @@
"reading": "しょぎょう",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix所業cloze-suffix",
"sentence-furigana": "cloze-prefix所業cloze-suffix",
"tags": "n",
@@ -3681,7 +3681,7 @@
"reading": "どぼくこうじ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix土木工事cloze-suffix",
"sentence-furigana": "cloze-prefix土木工事cloze-suffix",
"tags": "n",
@@ -3727,7 +3727,7 @@
"reading": "すき",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix好きcloze-suffix",
"sentence-furigana": "cloze-prefix好きcloze-suffix",
"tags": "adj-na, n",
@@ -3773,7 +3773,7 @@
"reading": "こうぞう",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix構造cloze-suffix",
"sentence-furigana": "cloze-prefix構造cloze-suffix",
"tags": "n",
@@ -3819,7 +3819,7 @@
"reading": "のたまう",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixのたもうたcloze-suffix",
"sentence-furigana": "cloze-prefixのたもうたcloze-suffix",
"tags": "v5",
@@ -3865,7 +3865,7 @@
"reading": "さんきゅう",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix39cloze-suffix",
"sentence-furigana": "cloze-prefix39cloze-suffix",
"tags": "",
@@ -3911,7 +3911,7 @@
"reading": "English",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixEnglishcloze-suffix",
"sentence-furigana": "cloze-prefixEnglishcloze-suffix",
"tags": "n",
@@ -3957,7 +3957,7 @@
"reading": "ユーエスビー",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixUSBcloze-suffix",
"sentence-furigana": "cloze-prefixUSBcloze-suffix",
"tags": "n",
@@ -4003,7 +4003,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixutsucloze-suffix",
"sentence-furigana": "cloze-prefixutsucloze-suffix",
"tags": "vt",
@@ -4044,7 +4044,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixutsucloze-suffix",
"sentence-furigana": "cloze-prefixutsucloze-suffix",
"tags": "vt",
@@ -4090,7 +4090,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixウツcloze-suffix",
"sentence-furigana": "cloze-prefixウツcloze-suffix",
"tags": "vt",
@@ -4131,7 +4131,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixウツcloze-suffix",
"sentence-furigana": "cloze-prefixウツcloze-suffix",
"tags": "vt",
@@ -4177,7 +4177,7 @@
"reading": "テキスト",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixてきすとcloze-suffix",
"sentence-furigana": "cloze-prefixてきすとcloze-suffix",
"tags": "n",
@@ -4223,7 +4223,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixウツcloze-suffix",
"sentence-furigana": "cloze-prefixウツcloze-suffix",
"tags": "vt",
@@ -4264,7 +4264,7 @@
"reading": "うつ",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixウツcloze-suffix",
"sentence-furigana": "cloze-prefixウツcloze-suffix",
"tags": "vt",
@@ -4310,7 +4310,7 @@
"reading": "すごい",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixすっっごーーいcloze-suffix",
"sentence-furigana": "cloze-prefixすっっごーーいcloze-suffix",
"tags": "adj-i",
@@ -4356,7 +4356,7 @@
"reading": "English",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixenglishcloze-suffix",
"sentence-furigana": "cloze-prefixenglishcloze-suffix",
"tags": "n",
@@ -4402,7 +4402,7 @@
"reading": "language",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixLANGUAGEcloze-suffix",
"sentence-furigana": "cloze-prefixLANGUAGEcloze-suffix",
"tags": "n",
@@ -4448,7 +4448,7 @@
"reading": "마시다",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefix마시거나cloze-suffix",
"sentence-furigana": "cloze-prefix마시거나cloze-suffix",
"tags": "v",
@@ -4494,7 +4494,7 @@
"reading": "English",
"screenshot": "",
"search-query": "fullQuery",
- "selection-text": "",
+ "popup-selection-text": "",
"sentence": "cloze-prefixenglishcloze-suffix",
"sentence-furigana": "cloze-prefixenglishcloze-suffix",
"tags": "n",
diff --git a/test/options-util.test.js b/test/options-util.test.js
index 0e9176070b..c6abc1ac4d 100644
--- a/test/options-util.test.js
+++ b/test/options-util.test.js
@@ -125,8 +125,20 @@ function createProfileOptionsTestData1() {
tags: ['yomitan'],
sentenceExt: 200,
screenshot: {format: 'png', quality: 92},
- terms: {deck: '', model: '', fields: {}},
- kanji: {deck: '', model: '', fields: {}},
+ terms: {
+ deck: '',
+ model: '',
+ fields: {
+ expression: '{selection-text}',
+ },
+ },
+ kanji: {
+ deck: '',
+ model: '',
+ fields: {
+ expression: '{selection-text}',
+ },
+ },
duplicateScope: 'collection',
fieldTemplates: null,
},
@@ -445,8 +457,20 @@ function createProfileOptionsUpdatedTestData1() {
server: 'http://127.0.0.1:8765',
tags: ['yomitan'],
screenshot: {format: 'png', quality: 92},
- terms: {deck: '', model: '', fields: {}},
- kanji: {deck: '', model: '', fields: {}},
+ terms: {
+ deck: '',
+ model: '',
+ fields: {
+ expression: '{popup-selection-text}',
+ },
+ },
+ kanji: {
+ deck: '',
+ model: '',
+ fields: {
+ expression: '{popup-selection-text}',
+ },
+ },
duplicateBehavior: 'new',
duplicateScope: 'collection',
duplicateScopeCheckAllModels: false,
@@ -612,7 +636,7 @@ function createOptionsUpdatedTestData1() {
},
],
profileCurrent: 0,
- version: 44,
+ version: 45,
global: {
database: {
prefixWildcardsSupported: false,
@@ -1792,6 +1816,21 @@ describe('OptionsUtil', () => {
{{#*inline "selection-text"}}
{{~#if (hasMedia "selectionText")}}{{{getMedia "selectionText"}}}{{/if~}}
{{/inline}}
+`.trimStart(),
+ },
+ {
+ oldVersion: 44,
+ newVersion: 45,
+ old: `
+{{#*inline "selection-text"}}
+ {{~#if (hasMedia "selectionText")}}{{{getMedia "selectionText"}}}{{/if~}}
+{{/inline}}
+`.trimStart(),
+
+ expected: `
+{{#*inline "popup-selection-text"}}
+ {{~#if (hasMedia "popupSelectionText")}}{{{getMedia "popupSelectionText"}}}{{/if~}}
+{{/inline}}
`.trimStart(),
},
];
diff --git a/types/ext/anki-note-builder.d.ts b/types/ext/anki-note-builder.d.ts
index 9174c56312..f80901685d 100644
--- a/types/ext/anki-note-builder.d.ts
+++ b/types/ext/anki-note-builder.d.ts
@@ -70,7 +70,7 @@ export type GetRenderingDataDetails = {
export type CommonData = AnkiTemplatesInternal.CreateDetails;
export type RequirementGeneric = {
- type: 'audio' | 'screenshot' | 'clipboardImage' | 'clipboardText' | 'selectionText';
+ type: 'audio' | 'screenshot' | 'clipboardImage' | 'clipboardText' | 'popupSelectionText';
};
export type RequirementTextFurigana = {
diff --git a/types/ext/anki-templates.d.ts b/types/ext/anki-templates.d.ts
index 44a087ebfd..8780be8941 100644
--- a/types/ext/anki-templates.d.ts
+++ b/types/ext/anki-templates.d.ts
@@ -32,7 +32,7 @@ export type Media = {
screenshot?: MediaObject;
clipboardImage?: MediaObject;
clipboardText?: MediaObject;
- selectionText?: MediaObject;
+ popupSelectionText?: MediaObject;
textFurigana?: TextFuriganaSegment[];
dictionaryMedia?: DictionaryMedia;
};
@@ -44,7 +44,7 @@ export type MediaSimpleType = (
'screenshot' |
'clipboardImage' |
'clipboardText' |
- 'selectionText'
+ 'popupSelectionText'
);
export type TextFuriganaSegment = {
diff --git a/types/ext/cross-frame-api.d.ts b/types/ext/cross-frame-api.d.ts
index a7291ce4b5..625eaebb46 100644
--- a/types/ext/cross-frame-api.d.ts
+++ b/types/ext/cross-frame-api.d.ts
@@ -97,7 +97,7 @@ type ApiSurface = {
params: void;
return: void;
};
- frontendGetSelectionText: {
+ frontendGetPopupSelectionText: {
params: void;
return: string;
};