Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Replace the ooptional groups header with one that has different text and can be decorated with CSS. This script works on petitions and signup pages. If you'd like to have it work with other pages then send us mail on support@salsalabs.com and we'll see what we can do.
<!-- Change the optional groups header on a page. This works on petitions and
signup pages. See https://salsasupport.zendesk.com/entries/98541948 -->
<style "text/css">
/* Rules to decorate the other-group-header that's inserted by the script (below). */
.other-group-header {
margin-top: 20px;
font-size: 15pt;
}
</style>
<script type="text/javascript">
// Customize the other group head in this petition by changing the text and
// making it so that the CSS (above) can be used to change its appearance.
document.addEventListener("DOMContentLoaded", function() {
var originalText = 'Add me to the following list(s):';
var replacementText = '<div class="other-group-header">Send me information about snacks!</div>';
var groups = document.getElementById('groups');
if (groups == null) {
return;
}
groups.innerHTML = groups.innerHTML.replace(originalText, replacementText);
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.