several bug fixes
This commit is contained in:
parent
ce9cfe43a2
commit
3248a01b2f
5 changed files with 28 additions and 15 deletions
|
|
@ -1,9 +1,9 @@
|
|||
function addHTTP(element) {
|
||||
if (element.value != "") {
|
||||
if (!element.value.match(/^\w+:\/\//)) {
|
||||
if (!element.value.match(/^\w+:\/\//) && !element.value.match(/^\^/) && !element.value.match(/^\//)) {
|
||||
element.value = "http://"+element.value;
|
||||
}
|
||||
if (!element.value.match(/^\w+:\/\/.+\..+/)){
|
||||
if (!element.value.match(/^\w+:\/\/.+\..+/) && !element.value.match(/^\^/) && !element.value.match(/^\//)){
|
||||
alert("That does not look like a proper URL. Please check if it is correct.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue