Skip to content

Instantly share code, notes, and snippets.

@ComFreek
Created January 5, 2013 15:57
Show Gist options
  • Save ComFreek/4462176 to your computer and use it in GitHub Desktop.
Save ComFreek/4462176 to your computer and use it in GitHub Desktop.
Extract all ISO 3166-1 country codes from the Wikipedia article's table: http://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements.
// Wikipedia article: http://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements
// jQuery Bookmarklet: http://marklets.com/jQuerify.aspx
// Extract country codes
var str = ""; $("table td:nth-child(3)").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