Skip to content

Instantly share code, notes, and snippets.

@anthonybrown
Forked from kentcdodds/bookmarklet
Created March 28, 2018 05:20
Show Gist options
  • Save anthonybrown/cf5229b7a2a1f7cb301e1ea2f93702ab to your computer and use it in GitHub Desktop.
Save anthonybrown/cf5229b7a2a1f7cb301e1ea2f93702ab to your computer and use it in GitHub Desktop.
activeElement logger bookmarklet
javascript:(function(){if(window._activeElInterval){clearInterval(window._activeElInterval);delete window._activeElInterval;}else{var activeEl;window._activeElInterval=setInterval(function(){var currentActiveEl=document.activeElement;if(currentActiveEl!==activeEl){activeEl=currentActiveEl;console.log(activeEl);}},200);}})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment