Skip to content

Instantly share code, notes, and snippets.

@gka
Created August 3, 2011 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gka/1123164 to your computer and use it in GitHub Desktop.
Save gka/1123164 to your computer and use it in GitHub Desktop.
Ever tried to copy&paste a table from Wikipedia to your favourite spreadsheet software? You just want the pure data and not all those hyperlinks and embedded images? This script removes unnecessary stuff from the tables. Simply run in firebug console and
// remove all images
$('table img').remove();
// remove all reference links
$('table .reference').remove()
// convert all links to plain text
$('table a').each(function(index, el) { $(el).replaceWith($(el).html()) });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment