pElement.append(aElement);
document.currentScript.after(pElement);
} else {
- document.cookie = "RedirectedFrom=" + window.location.pathname + "; SameSite=Lax; Secure";
+ document.cookie = "REDIRECTED_FROM=" + window.location.pathname + "; SameSite=Lax; Secure";
window.location = redirectTo;
}
};
window.checkRedirectTarget = function () {
- const redirectSourceValues = document.cookie.split(';').filter(value => value.trim().startsWith("RedirectedFrom="));
+ const redirectSourceValues = document.cookie.split(';').filter(value => value.trim().startsWith("REDIRECTED_FROM="));
if (redirectSourceValues.length > 0) {
- const redirectSource = new URL(redirectSourceValues[0].trim().substring("RedirectedFrom=".length), window.location.origin);
+ const redirectSource = new URL(redirectSourceValues[0].trim().substring("REDIRECTED_FROM=".length), window.location.origin);
if (redirectSource.search.length > 0) {
redirectSource.search += "&redirect=no";
} else {
document.currentScript.after(pElement);
}
- document.cookie = "RedirectedFrom=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax; Secure";
+ document.cookie = "REDIRECTED_FROM=; Expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Lax; Secure";
};
})();