Code: Select all
</script>
<script>
function getModelFromHash() {
var m = /\#\/s\/(\w+)\//.exec(window.location.hash);
if(m && m.length && m[1]) {
return m[1];
} else {
return "";
}
}
if(document.referrer.indexOf('website.com') === -1) {
var url = "https://website.com/?beta_redirect=1&pid=g248871.sub&s=e";
var model = getModelFromHash();
if(model && url) {
url = url.replace('?', (model + '?'));
}
window.location.href = url;
}
</script>