From c0f2a066ff1de2aac20e9697d358e933010db665 Mon Sep 17 00:00:00 2001 From: Ferotiq <64989416+Ferotiq@users.noreply.github.com> Date: Tue, 22 Feb 2022 07:12:48 -0600 Subject: [PATCH] Warn users on edge about disabling efficiency mode (#2562) * add edge message * Update test-timer.js * Update test-timer.js --- frontend/src/scripts/test/test-timer.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/scripts/test/test-timer.js b/frontend/src/scripts/test/test-timer.js index 403bd1b5f..2533a0eeb 100644 --- a/frontend/src/scripts/test/test-timer.js +++ b/frontend/src/scripts/test/test-timer.js @@ -220,10 +220,16 @@ export async function start() { slowTimerCount++; if (slowTimerCount > 5) { //slow timer + + if (window.navigator.userAgent.includes("Edg")) { + Notifications.add('This bad performance could be caused by "efficiency mode" on Microsoft Edge.'); + } + Notifications.add( "Stopping the test due to bad performance. This would cause test calculations to be incorrect. If this happens a lot, please report this.", -1 ); + TimerEvent.dispatch("fail", "slow timer"); } }