removed dependency by moving click handler

part of #2462
This commit is contained in:
Miodec 2022-02-11 14:02:29 +01:00
parent b0bc26c90c
commit 51ec0ffec8
2 changed files with 5 additions and 5 deletions

View file

@ -2,6 +2,7 @@ import * as DB from "../db";
import * as Loader from "../elements/loader";
import * as Notifications from "../elements/notifications";
import axiosInstance from "../axios-instance";
import * as TestWords from "./../test/test-words";
let rating = 0;
@ -216,3 +217,7 @@ $("#quoteRatePopup .stars .star").mouseout((e) => {
$("#quoteRatePopup .submitButton").click((e) => {
submit();
});
$(".pageTest #rateQuoteButton").click(async (event) => {
show(TestWords.randomQuote);
});

View file

@ -9,7 +9,6 @@ import * as Caret from "./caret";
import * as OutOfFocus from "./out-of-focus";
import * as Replay from "./replay";
import * as Misc from "../misc";
import * as QuoteRatePopup from "../popups/quote-rate-popup";
import * as PageController from "./../controllers/page-controller";
import * as SlowTimer from "../states/slow-timer";
import * as ReportQuotePopup from "../popups/quote-report-popup";
@ -807,10 +806,6 @@ $(".pageTest #copyWordsListButton").click(async (event) => {
}
});
$(".pageTest #rateQuoteButton").click(async (event) => {
QuoteRatePopup.show(TestWords.randomQuote);
});
$(".pageTest #reportQuoteButton").click(async (event) => {
ReportQuotePopup.show({
quoteId: parseInt(TestWords.randomQuote.id),