removed dependency by moving click handler

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

View file

@ -3,6 +3,7 @@ import * as Notifications from "../elements/notifications";
import axiosInstance from "../axios-instance";
import Config from "../config";
import * as Loader from "../elements/loader";
import * as TestWords from "./../test/test-words";
const CAPTCHA_ID = 1;
@ -138,3 +139,10 @@ $("#quoteReportPopup .comment").on("input", (e) => {
$("#quoteReportPopup .submit").on("click", async (e) => {
await submitReport();
});
$(".pageTest #reportQuoteButton").click(async (event) => {
show({
quoteId: parseInt(TestWords.randomQuote.id),
noAnim: false,
});
});

View file

@ -11,7 +11,6 @@ import * as Replay from "./replay";
import * as Misc from "../misc";
import * as PageController from "./../controllers/page-controller";
import * as SlowTimer from "../states/slow-timer";
import * as ReportQuotePopup from "../popups/quote-report-popup";
$(document).ready(() => {
UpdateConfig.subscribeToEvent((eventKey, eventValue) => {
@ -806,13 +805,6 @@ $(".pageTest #copyWordsListButton").click(async (event) => {
}
});
$(".pageTest #reportQuoteButton").click(async (event) => {
ReportQuotePopup.show({
quoteId: parseInt(TestWords.randomQuote.id),
noAnim: false,
});
});
$(".pageTest #toggleBurstHeatmap").click(async (event) => {
UpdateConfig.setBurstHeatmap(!Config.burstHeatmap);
});