Skip to content

Instantly share code, notes, and snippets.

@ryandejaegher
Last active June 2, 2020 17:11
Show Gist options
  • Select an option

  • Save ryandejaegher/c43c5cdc6bfc8184aa5fac76b405e670 to your computer and use it in GitHub Desktop.

Select an option

Save ryandejaegher/c43c5cdc6bfc8184aa5fac76b405e670 to your computer and use it in GitHub Desktop.
Remove comma from Squarespace categories
/* Add to Settings -> Advanced -> Code Injection -> Footer in Squarespace */
<script>
window.addEventListener('load', function(){
(function(){
var cats = document.querySelectorAll('.summary-metadata-item--cats, .Blog-meta-item--categories');
cats.forEach(item => {
item.innerHTML = item.innerHTML.replace(", ", "")
})
}())
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment