Skip to content

Instantly share code, notes, and snippets.

@darkronin
Last active December 17, 2024 10:42
Show Gist options
  • Save darkronin/4289997813cc8cd04a4756bec1c4a793 to your computer and use it in GitHub Desktop.
Save darkronin/4289997813cc8cd04a4756bec1c4a793 to your computer and use it in GitHub Desktop.
Alerts if the pychess user has a new chat message
javascript:(function(){let g = (id) => document.getElementById(id); let lc = g('username').lastChild; let myuser = lc.innerText; if(!window.pyc) { window.pyc = {}; } window.pyc.ccl = g('messages').children.length; function cclp(){ if( window.pyc.ccl != g('messages').children.length ){ function drale(){ lc.innerText = myuser } window.pyc.ccl = g('messages').children.length; lc.innerText = "** CHAT! **" } setTimeout( drale, 800); } setInterval(cclp, 500);})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment