Skip to content

Instantly share code, notes, and snippets.

@fczuardi
Created September 15, 2015 22:49
Show Gist options
  • Save fczuardi/5515d632e7576b8b3c7a to your computer and use it in GitHub Desktop.
Save fczuardi/5515d632e7576b8b3c7a to your computer and use it in GitHub Desktop.
Foxbit click to highlight
// 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