Skip to content

Instantly share code, notes, and snippets.

@deecewan
Created May 12, 2016 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save deecewan/55303750c523f32db0235c881430d14f to your computer and use it in GitHub Desktop.
Save deecewan/55303750c523f32db0235c881430d14f to your computer and use it in GitHub Desktop.
/**
* This is a little, useless script that will highlight your Javadoc methods green when you click them.
* I made it because I kept looking at the wrong one when I was implementing it.
*
* Just copy and paste this into your browsers JS console. Changing tabs will break functionality. You'll have to redo it
*/
[].forEach.call(document.querySelectorAll('h3'), function(tag){
if (tag.parentNode.tagName == 'LI'){
var theUl = tag.parentNode.querySelectorAll('ul.blockList, ul.blockListLast');
for (var i = 0; i < theUl.length; i++){
theUl[i].onclick = function(){
for (var i = 0; i < theUl.length; i++){
theUl[i].querySelector('.blockList').style.backgroundColor = "#FFFFFF";
}
this.querySelector('.blockList').style.backgroundColor = '#75ff93';
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment