Last active
December 10, 2015 16:38
-
-
Save ComFreek/4461805 to your computer and use it in GitHub Desktop.
Extract all ISO 639-1 language codes from the Wikipedia article's table: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes.
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
// Wikipedia article: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes | |
// jQuery Bookmarklet: http://marklets.com/jQuerify.aspx | |
// Extract language names | |
var str = ""; $("table td:nth-child(3)").each(function (idx, val) {str += $(val).text() + "\n";}); $("#bodyContent").prepend($("<textarea></textarea>").val(str)); | |
// Extract language codes (2 characters) | |
var str = ""; $("table td:nth-child(5)").each(function (idx, val) {str += $(val).text() + "\n";}); $("#bodyContent").prepend($("<textarea></textarea>").val(str)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment