Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Show a message when there aren't any actions on the active action list. Useful for those times when the legislators are not legislating.
<!-- BEGIN Show a message when the action list is empty. -->
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () {
if (RegExp('action4/common/public/$').test(window.location.href)) {
if (document.querySelectorAll('#salsa > ul > li').length == 0) {
var target = document.querySelector('#salsa > ul');
target.appendChild(document.querySelector('#empty-action-list'));
}
}
});
</script>
<div style="display: none;">
<!-- Modify or replace this as needed. Make sure that the `id` parameter is there if you replace this. -->
<h2 id="empty-action-list">There aren't any actions now. Please check back later!</h2>
</div>
<!-- END Show a message when the action list is empty. -->
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.