Skip to content

Commit

Permalink
Update Guide_Redirect.js
Browse files Browse the repository at this point in the history
Updated Indentation
  • Loading branch information
scotthavard92 authored Nov 13, 2018
1 parent 81b7e80 commit 23a9511
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions Guide_Redirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,18 @@ if (url.includes("YOURSUBDOMAIN.com/hc/en-us/articles/")) {
//External Redirect Mapping
external_redirect['115004730086'] = "https://developer.mixpanel.com/docs/http";

//Redirects if needed -> Doesn't redirect if not.
if (currentId in redirect) {
if (typeof redirect[currentId] !== "undefined") {
newUrl = 'https://help.mixpanel.com/hc/en-us/articles/' + redirect[currentId];
window.location.replace(newUrl);
}
}
//Redirects if needed -> Doesn't redirect if not.
if (currentId in redirect) {
if (typeof redirect[currentId] !== "undefined") {
newUrl = 'https://help.mixpanel.com/hc/en-us/articles/' + redirect[currentId];
window.location.replace(newUrl);
}
}

else if (currentId in external_redirect) {
if (typeof external_redirect[currentId] !== "undefined") {
newExternalUrl = external_redirect[currentId];
window.location.replace(newExternalUrl);
}
}


}
if (typeof external_redirect[currentId] !== "undefined") {
newExternalUrl = external_redirect[currentId];
window.location.replace(newExternalUrl);
}
}
}

0 comments on commit 23a9511

Please sign in to comment.