Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roryg/ghostwriter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRory Gibson <rg.rorygibson@gmail.com>2015-07-07 11:01:04 +0300
committerRory Gibson <rg.rorygibson@gmail.com>2015-07-07 11:01:04 +0300
commit3d03a390652f44ce670cbcd7f50d29ad9b613dd8 (patch)
tree1df23cc2aaa13dcaf1fda4572529cdd2f042b422
parentad7dd317192874abd90f3acc1efece33a3c5fb35 (diff)
parent36e674ed6bebb7a6580a552cea5b982600f847ca (diff)
Merge branch 'pdeva-patch-1'
-rw-r--r--assets/js/scripts.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/assets/js/scripts.js b/assets/js/scripts.js
index ee47bc6..72ca12c 100644
--- a/assets/js/scripts.js
+++ b/assets/js/scripts.js
@@ -94,6 +94,15 @@ 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.indexOf("http://", 0) === 0)
+ {
+ 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(/\/$/, "")) {