Created
July 17, 2013 15:48
-
-
Save aJanuary/6021827 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(function() { | |
var links = document.getElementsByTagName('a'); | |
for (var i = 0, len = links.length; i < len; i += 1) { | |
var link = links[i]; | |
var href = link.getAttribute('href'); | |
if (href != null && href.substring(0, 2) == '#f') { | |
link.name = 'footnote' + href.substring(2); | |
} else if (link.name.length >= 1 && link.name[0] == 'f') { | |
link.href = '#footnote' + link.name.substring(1); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment