Removed subdomain requirement.

This commit is contained in:
Ajay Ramachandran 2020-02-08 22:55:59 -05:00
parent 22cc51734f
commit 2b558c43bd
2 changed files with 3 additions and 4 deletions

View file

@ -415,7 +415,7 @@
"message": "Reset"
},
"customAddressError": {
"message": "This address is not in the right form. Make sure you have http:// or https:// at the begining and no slashes or sub-folders at the end."
"message": "This address is not in the right form. Make sure you have http:// or https:// at the begining and no trailing slashes."
},
"areYouSureReset": {
"message": "Are you sure you would like to reset this?"

View file

@ -362,9 +362,8 @@ function validateServerAddress(input: string): string {
input = input.substring(0, input.length - 1);
}
// Isn't HTTP protocol or has extra slashes
if ((!input.startsWith("https://") && !input.startsWith("http://"))
|| input.replace("://", "").includes("/")) {
// If it isn't HTTP protocol
if ((!input.startsWith("https://") && !input.startsWith("http://"))) {
alert(chrome.i18n.getMessage("customAddressError"));