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:
-rw-r--r--assets/js/scripts.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/assets/js/scripts.js b/assets/js/scripts.js
index 3d471ec..72ca12c 100644
--- a/assets/js/scripts.js
+++ b/assets/js/scripts.js
@@ -96,12 +96,13 @@ jQuery(function($) {
//if url starts with http:// and currentState.url starts with
// https://, replace the protocol in url
- if(url.startsWith("http://"))
+ 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(/\/$/, "")) {