Skip to content

Instantly share code, notes, and snippets.

@dinigo
Last active May 31, 2017 15:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dinigo/ab6beab45199c12ef230a81a32934a7a to your computer and use it in GitHub Desktop.
if(document.referrer){
var url = new URL(document.referrer)
console.log("Check refferer and redirect: " + document.referrer);
if(url.pathname === '/customer/account/create/'){
console.log("Redirecting to post-register form");
window.location.href = '/post_register';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment