Skip to content

Instantly share code, notes, and snippets.

@salsalabs
Last active March 8, 2021 23:12
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/f23d3e9ae071c8bc1ad50c893bf9b399 to your computer and use it in GitHub Desktop.
Save salsalabs/f23d3e9ae071c8bc1ad50c893bf9b399 to your computer and use it in GitHub Desktop.
Hide optional groups when no optional groups are selected.
<!-- BEGIN script to hide optional groups prompt when there are no optional groups. -->
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", () => {
var e = document.querySelector("#salsa-optional-groups-header")
if (e != null) {
var f = document.querySelectorAll("li.salsa-optional-group")
if (f.length == 0) {
e.style.display = "None"
}
}
});
</script>
<!-- END script to hide optional groups prompt when there are no optional groups. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment