Created
March 30, 2020 16:54
-
-
Save itsmunim/a2a5b4b350ef5eed05db19e22ea97d5a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| const header = document.getElementsByClassName('header')[0]; | |
| const statusElem = document.getElementById('status-txt'); | |
| const listener = ({ status }) => { | |
| const emoji = status === 'normal' ? '๐' : '๐'; | |
| statusElem.innerText = `${status.replace(/-/g, ' ').toUpperCase()} ${emoji}`; | |
| }; | |
| ScrollToStick.applyScrollToStick('header-wrap', header.offsetHeight, { listener }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment