Created
August 3, 2011 17:09
-
-
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
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
// 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