mirror of
https://github.com/obsqrbtz/goose-highlighter.git
synced 2026-04-08 20:19:06 +03:00
fix: set event handlers in DOMContentLoaded
This commit is contained in:
@@ -169,6 +169,8 @@ function renderWords() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
localizePage();
|
||||||
document.getElementById("selectAllBtn").onclick = () => {
|
document.getElementById("selectAllBtn").onclick = () => {
|
||||||
const list = lists[currentListIndex];
|
const list = lists[currentListIndex];
|
||||||
list.words.forEach((_, index) => {
|
list.words.forEach((_, index) => {
|
||||||
@@ -334,8 +336,6 @@ function localizePage() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', localizePage);
|
|
||||||
|
|
||||||
const toggle = document.getElementById('themeToggle');
|
const toggle = document.getElementById('themeToggle');
|
||||||
const body = document.body;
|
const body = document.body;
|
||||||
|
|
||||||
@@ -368,3 +368,4 @@ document.getElementById("deselectAllBtn").onclick = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
load();
|
load();
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user