Last active
December 27, 2018 16:08
-
-
Save salsalabs/ee4bbac558868a6be965920b19f16ac7 to your computer and use it in GitHub Desktop.
Workaround to replace a potentially confusing message in the unsubscribe workflow.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- SalsaStaff 266260: BEGIN workaround to change potentially confusing unsubscribe message. --> | |
<script type="text/javascript"> | |
var NEW_TEXT = "Please check your email for a confirmation letter from us to click a final link to be removed from all future emails."; | |
if (window.location.href.indexOf('/followUp') != -1) { | |
document.addEventListener("DOMContentLoaded", function() { | |
var e = document.querySelector("div.error"); | |
if (e != null) { | |
if (/You were successfully removed from all future emails/.test(e.innerHTML)) { | |
e.innerHTML = NEW_TEXT; | |
} | |
} | |
})); | |
} | |
</script> | |
<!-- SalsaStaff 266260: END workaround to change potentially confusing unsubscribe message. --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment