mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-08 14:42:46 +08:00
removed dependency by moving click handler
fixes 1 circular dependency part of #2462
This commit is contained in:
parent
8916573d87
commit
8b6e52e721
2 changed files with 4 additions and 5 deletions
|
@ -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" &&
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue