More IE 11 hacks

This commit is contained in:
Nikita Karamov 2020-09-23 18:32:36 +02:00
parent ee1089ef65
commit 2bc5833fca
No known key found for this signature in database
GPG key ID: E40DFE6E993540FF

View file

@ -26,11 +26,10 @@ document
var instance = e.target.elements['instance'].value; var instance = e.target.elements['instance'].value;
var remember = e.target.elements['remember'].checked; var remember = e.target.elements['remember'].checked;
if (instance.indexOf("http://") == -1 && instance.indexOf("https://") == -1) {
if (!(instance.startsWith("https://") || instance.startsWith("http://"))) {
instance = "https://" + instance; instance = "https://" + instance;
} }
if (!instance.endsWith("/")){ if (instance.charAt(instance.length - 1) !== '/'){
instance = instance + "/"; instance = instance + "/";
} }