From 7f6f08203fda3bd812004a6200e5c350c1503bfc Mon Sep 17 00:00:00 2001 From: James Shiffer Date: Thu, 27 Jul 2023 22:19:12 -0700 Subject: [PATCH] Fixed logic errors --- public/js/perms.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/perms.js b/public/js/perms.js index 393e0c3..d9d36d9 100644 --- a/public/js/perms.js +++ b/public/js/perms.js @@ -5,9 +5,9 @@ function ask() { if (e.message === 'Permission denied') { if (!askedOnce) return; - if (location.host.indexOf("www") !== 0) - location.host = "www2." + location.host; - else if (location.host.indexOf("www.") !== 0) + if (location.host.indexOf("www.") === 0) + location.host = "www2." + location.host.slice(4); + else if (location.host.indexOf("www") === 0) location.host = "www" + (Number(location.host[3]) + 1) + "." + location.host.slice(5); else location.host = "www." + location.host;