var url = location.href; if (url.indexOf('http://') == 0 || url.indexOf('https://') == 0)