Created
October 31, 2022 14:40
-
-
Save dvdsmpsn/b2c84cf07009dc527759e8b16ca0c185 to your computer and use it in GitHub Desktop.
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
// turns `<h1...h4>Hello world</h1..h4>` into `<h1...h4>Hell🎃 w🎃rld</h1..h4>` | |
// on halloween only | |
const now = new Date(); | |
const isHalloween = now.getMonth() === 9 && now.getDate() === 31; | |
if (isHalloween) { | |
const h = document.querySelectorAll('h1,h2,h3,h4'); | |
h.forEach(i => i.innerHTML = i.innerHTML.replaceAll('o', '🎃')) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And for holiday season....