Skip to content

Instantly share code, notes, and snippets.

@davidalpert
Last active September 20, 2015 15:14
Show Gist options
  • Save davidalpert/a103c10889b74f9e5ef0 to your computer and use it in GitHub Desktop.
Save davidalpert/a103c10889b74f9e5ef0 to your computer and use it in GitHub Desktop.
Tampermonkey - Remove Episode Descriptions
// ==UserScript==
// @name Hide Episode Descriptions
// @namespace https://gist.github.com/davidalpert/a103c10889b74f9e5ef0
// @version 0.1
// @description hides (and then optionally toggles) the descriptions of episode listings on Wikipedia
// @author David Alpert
// @match https://en.wikipedia.org/wiki/*episodes*
// @match http://en.wikipedia.org/wiki/*episodes*
// @match https://en.wikipedia.org/wiki/*(TV_series)
// @match http://en.wikipedia.org/wiki/*(TV_series)
// @match https://en.wikipedia.org/wiki/*(season_*)
// @match http://en.wikipedia.org/wiki/*(season_*)
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
// @grant none
// ==/UserScript==
function HideEpisodeDescriptions() {
if (window.jQuery == 'undefined') {
window.setTimeout(HideEpisodeDescriptions, 100);
} else {
var $ = window.jQuery;
$('td.summary').click(function(ev) {
$(this).parent().next().children('td.description').toggle();
});
$('td.description').hide();
}
}
HideEpisodeDescriptions();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment