removed dependency by moving click handler

fixes 1 circular dependency
part of #2462
This commit is contained in:
Miodec 2022-02-11 16:17:13 +01:00
parent 8916573d87
commit 8b6e52e721
2 changed files with 4 additions and 5 deletions

View file

@ -187,6 +187,10 @@ $("#customTextPopup .wordfilter").click(() => {
WordFilterPopup.show();
});
$(document).on("click", "#top .config .customText .text-button", () => {
show();
});
$(document).keydown((event) => {
if (
event.key === "Escape" &&

View file

@ -1,5 +1,4 @@
import UpdateConfig from "../config";
import * as CustomTextPopup from "../popups/custom-text-popup";
import * as Misc from "./../misc";
// export function show() {
@ -157,10 +156,6 @@ export function update(previous, current) {
);
}
$(document).on("click", "#top .config .customText .text-button", () => {
CustomTextPopup.show();
});
$(document).ready(() => {
UpdateConfig.subscribeToEvent((eventKey, eventValue, eventValue2) => {
if (eventKey === "mode") update(eventValue, eventValue2);