Created
May 12, 2016 09:15
-
-
Save deecewan/55303750c523f32db0235c881430d14f to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* 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