From 0099460e4dac1e7518d117bc01993c827ea93922 Mon Sep 17 00:00:00 2001 From: tretrauit <3550664-tretrauit@users.noreply.gitlab.com> Date: Tue, 6 Jul 2021 18:14:19 +0000 Subject: [PATCH] Remove video player to reduce CPU usage --- Games/Arena_of_Valor/AWC_AutoSpin.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Games/Arena_of_Valor/AWC_AutoSpin.js b/Games/Arena_of_Valor/AWC_AutoSpin.js index 702aa03..e7e385a 100644 --- a/Games/Arena_of_Valor/AWC_AutoSpin.js +++ b/Games/Arena_of_Valor/AWC_AutoSpin.js @@ -68,6 +68,7 @@ await fetch("https://code.jquery.com/jquery-3.6.0.min.js").then(x => x.text()).t for (let i = 0; i < 3; i++) { teams[i].dispatchEvent(new MouseEvent("click")); } + setTimeout(() => jQuery(".ReactModal__Overlay").trigger("click"), 2000) } // Check for dialog message then close function closeSwalDialog() { @@ -103,7 +104,11 @@ await fetch("https://code.jquery.com/jquery-3.6.0.min.js").then(x => x.text()).t } spin() - + // Disable window change jQuery("window").off("mouseup") jQuery("document").off("visibilitychange") + // Remove video player (so it isnt annoying to me and save CPU by a lot) + Array.from(document.getElementsByTagName("iframe")).forEach((iframe) => { + iframe.remove() + }) }