From 2bc5833fca4bda753c09d9f923dec53d7067fd3f Mon Sep 17 00:00:00 2001 From: Nikita Karamov Date: Wed, 23 Sep 2020 18:32:36 +0200 Subject: [PATCH] More IE 11 hacks --- src/script/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/script/index.js b/src/script/index.js index 043b8ea..60f2b61 100644 --- a/src/script/index.js +++ b/src/script/index.js @@ -26,11 +26,10 @@ document var instance = e.target.elements['instance'].value; var remember = e.target.elements['remember'].checked; - - if (!(instance.startsWith("https://") || instance.startsWith("http://"))) { + if (instance.indexOf("http://") == -1 && instance.indexOf("https://") == -1) { instance = "https://" + instance; } - if (!instance.endsWith("/")){ + if (instance.charAt(instance.length - 1) !== '/'){ instance = instance + "/"; }