diff options
author | bfabiszewski <github@ushuaia.pl> | 2013-06-23 00:17:28 +0200 |
---|---|---|
committer | bfabiszewski <github@ushuaia.pl> | 2013-06-23 00:17:28 +0200 |
commit | bf662e9949165d792c8d3d4fc5b6b9d1fa1e6ab6 (patch) | |
tree | a52041bb18522f0810f7ef41121e695955438c0d /main.js | |
parent | 36df283a69265ef6dc0007d6fa9e39dd807cae7e (diff) | |
download | RunnerUpLive-bf662e9949165d792c8d3d4fc5b6b9d1fa1e6ab6.zip |
various minor fixes
Diffstat (limited to 'main.js')
-rwxr-xr-x | main.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -289,7 +289,7 @@ function loadMapAPI(api) { var url = new Array(); if (api=='gmaps') { url.push('api_gmaps.js'); - url.push('https://maps.googleapis.com/maps/api/js?'+((gkey!==null)?('key='+gkey+'&'):'')+'sensor=false&callback=init'); + url.push('//maps.googleapis.com/maps/api/js?'+((gkey!==null)?('key='+gkey+'&'):'')+'sensor=false&callback=init'); } else { url.push('api_openlayers.js'); @@ -341,7 +341,8 @@ function isScriptLoaded(url) { scripts = document.getElementsByTagName('script'); for (var i = scripts.length; i--;) { // check if url matches src - if (scripts[i].src != '' && url.indexOf(scripts[i].src) !== -1) return true; + var scriptUrl = scripts[i].src.replace(/https?:/,''); + if (scriptUrl != '' && url.indexOf(scriptUrl) !== -1) return true; } return false; } |