diff options
Diffstat (limited to 'assets/js/scripts.js')
-rw-r--r-- | assets/js/scripts.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/assets/js/scripts.js b/assets/js/scripts.js index ee47bc6..3d471ec 100644 --- a/assets/js/scripts.js +++ b/assets/js/scripts.js @@ -94,6 +94,14 @@ jQuery(function($) { var url = $(this).attr('href'); var title = $(this).attr('title') || null; + //if url starts with http:// and currentState.url starts with + // https://, replace the protocol in url + if(url.startsWith("http://")) + { + var urlNoProt = url.replace(/.*?:\/\//g, ""); + var curProt = currentState.url.split("/")[0]; + url = curProt + "//" + urlNoProt; + } // If the requested url is not the current states url push // the new state and make the ajax call. if (url !== currentState.url.replace(/\/$/, "")) { |