Created
January 31, 2023 20:32
-
-
Save bjornpagen/57f7c3c767de01d3b12b3c44356fd062 to your computer and use it in GitHub Desktop.
A JavaScript function to delete all elements with the class notion-toggle from the DOM.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function deleteNotionToggleElements() { | |
const elements = document.getElementsByClassName("notion-toggle"); | |
while (elements.length > 0) { | |
elements[0].parentNode.removeChild(elements[0]); | |
} | |
} | |
document.addEventListener("DOMContentLoaded", function() { | |
deleteNotionToggleElements(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment