Skip to content

Instantly share code, notes, and snippets.

@dariocravero
Created January 30, 2015 14:40
Show Gist options
  • Save dariocravero/6e8e15491e79cf28f495 to your computer and use it in GitHub Desktop.
Save dariocravero/6e8e15491e79cf28f495 to your computer and use it in GitHub Desktop.
Expand MDN's a tag titles into text nodes
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);
});
@dariocravero
Copy link
Author

Run that into MDN's site through Dev Tools. To turn this into this.
Try it on ES6 docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment