XKCDCleaner

Wipe out trash and only leave the content.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         XKCDCleaner
// @namespace    http://www.fuckboygamers.club
// @version      1.0
// @description  Wipe out trash and only leave the content.
// @author       Mr Whiskey
// @match        htt*://xkcd.com/*
// @require      http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
// ==/UserScript==

$( "div" ).remove( "#bottom" ); // Remove footer
$( "div" ).remove( "#topContainer" ); // Remove header
$("a").filter(":contains('|<')").remove(); // remove "comic one"
$("a").filter(":contains('>|')").remove(); // remove "recent comic"
$("a").filter(":contains('Random')").remove(); // remove "random"
$("a").filter(":contains('< Prev')").attr('href', 'javascript:history.back()'); // Change Prev button to go back to the last page you were on
$("a").filter(":contains('Next >')").attr('href', '//c.xkcd.com/random/comic/'); // Change Next button to find a random comic
$('div').last().remove(); // Remove "transcript" (invisible element containing no useful text)
$('div br:last-child')[0].nextSibling.nodeValue = ''; // Remove "Image Hyperlink" comment (Right click + copy image url)