Created
September 15, 2015 22:49
-
-
Save fczuardi/5515d632e7576b8b3c7a to your computer and use it in GitHub Desktop.
Foxbit click to highlight
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
// Copie e cole este codigo no campo console do seu firefox | |
window.username = '---'; | |
function nameClicked(event){ | |
window.username = event.target.textContent; | |
} | |
function highlightName(){ | |
let s = new RegExp(window.username); | |
for (e of $$(".order-book-username")){ | |
e.style.backgroundColor = e.textContent.match(s) ? 'lightgreen' : 'inherit'; | |
e.removeEventListener('click', nameClicked); | |
e.addEventListener('click', nameClicked); | |
} | |
window.requestAnimationFrame(highlightName); | |
} | |
window.requestAnimationFrame(highlightName); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment