Created
January 30, 2015 14:40
-
-
Save dariocravero/6e8e15491e79cf28f495 to your computer and use it in GitHub Desktop.
Expand MDN's a tag titles into text nodes
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
Array.prototype.forEach.apply( | |
document.querySelectorAll('#wikiArticle ul li'), | |
function(li) { | |
var title = document.createElement('div'); | |
title.innerText = li.querySelector('a').title; | |
li.appendChild(title); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run that into MDN's site through Dev Tools. To turn this into this.
Try it on ES6 docs.