XKCDCleaner

Wipe out trash and only leave the content.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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)