aboutsummaryrefslogtreecommitdiff
path: root/yomichan-user/conf.d/word-export.js
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-05-09 20:19:22 +0200
committerlonkaars <loek@pipeframe.xyz>2023-05-09 20:19:22 +0200
commit99146502259dfc324ec427169e25554aaa91ab97 (patch)
tree4e8273c24d3a50926b65c481a20eebe6910946f9 /yomichan-user/conf.d/word-export.js
parent67e7e2eee2c4a09b35470711fe5ac10453841d8c (diff)
WIP handwriting panel (added libs + button to search bar)
Diffstat (limited to 'yomichan-user/conf.d/word-export.js')
-rw-r--r--yomichan-user/conf.d/word-export.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/yomichan-user/conf.d/word-export.js b/yomichan-user/conf.d/word-export.js
index de036e4..8f512d6 100644
--- a/yomichan-user/conf.d/word-export.js
+++ b/yomichan-user/conf.d/word-export.js
@@ -1,3 +1,5 @@
+{
+
function exportWord(entry) {
var wordElement = entry.getElementsByClassName("headword-term")[0];
var hasKanji = false;
@@ -43,7 +45,7 @@ function exportWord(entry) {
function addWordCopyButtons() {
var definitions = document.getElementById("dictionary-entries").getElementsByClassName("entry");
for (var definition of definitions) {
- if (definition.classList.contains("patched")) continue;
+ if (definition.classList.contains("word-export-patched")) continue;
var actions = definition.getElementsByClassName("actions")[0];
var button = document.createElement("button");
@@ -59,7 +61,7 @@ function addWordCopyButtons() {
icon.setAttribute("data-title-default", title);
button.appendChild(icon);
actions.insertBefore(button, actions.childNodes[0]);
- definition.classList.add("patched");
+ definition.classList.add("word-export-patched");
}
}
@@ -75,3 +77,5 @@ function addWordCopyButtons() {
exportWord(document.getElementsByClassName("entry-current")[0]);
});
})();
+
+}