Skip to content

Instantly share code, notes, and snippets.

@salsalabs
Last active December 27, 2018 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salsalabs/ee4bbac558868a6be965920b19f16ac7 to your computer and use it in GitHub Desktop.
Save salsalabs/ee4bbac558868a6be965920b19f16ac7 to your computer and use it in GitHub Desktop.
Workaround to replace a potentially confusing message in the unsubscribe workflow.
<!-- 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