function addhttp(url) {
    if (!/^(f|ht)tps?:\/\//i.test(url)) {
        url = "http://" + url;
    }
    return url;
}
// Add HTTP if no prefix exists
Add HTTP if no prefix exists
Add HTTP if no prefix exists
function addhttp(url) {
    if (!/^(f|ht)tps?:\/\//i.test(url)) {
        url = "http://" + url;
    }
    return url;
}
function addhttp ( url ) { if ( ! / ^(f|ht)tps?:\/\/ / i . test ( url ) ) { url = "http://" + url ; } return url ; }
Add HTTP if no prefix exists
Add HTTP if no prefix exists