From 6a114e07b7a9a35f1eb455242cc867282e4e5678 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Tue, 14 Jan 2025 22:33:51 -0800 Subject: [PATCH] fix ping syntax? --- apps/assets/js/trLoader.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/assets/js/trLoader.js b/apps/assets/js/trLoader.js index 46bdea6..6b228d6 100644 --- a/apps/assets/js/trLoader.js +++ b/apps/assets/js/trLoader.js @@ -656,10 +656,14 @@ function trLoader(hwid) { // And call the callback in TIMEOUT seconds, to see whether it's been loaded setTimeout(function () { - if (img.attr('status') == 'down') wtolog('URL is down'); - else wtolog('URL is up'); - window.location.assign(url.app_url); - //callback(url, img.attr('status')); + if (img.attr('status') == 'down') { + wtolog('URL is down'); + callback(url, img.attr('status')); + } else { + wtolog('URL is up'); + window.location.assign(url.app_url); + //callback(url, img.attr('status')); + } }, TIMEOUT*1000); }