Learn C The Hard Way Next Page

Add a next page button to the bottom of Learn C The Hard Way

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo 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       Learn C The Hard Way Next Page
// @namespace  http://cyanium.com/
// @version    0.1
// @description  Add a next page button to the bottom of Learn C The Hard Way
// @match      http://c.learncodethehardway.org/book/*
// @grant none
// @copyright  2012+, Ry167
// ==/UserScript==
(function(){
    var loc = window.location.href;
    var number = parseInt(loc.match(/\d+/)[0])+1;
    var href = "http://c.learncodethehardway.org/book/ex"+number+".html";
    var link = document.createElement('a');
    link.setAttribute('href', href);
    link.innerText = "Next Page";
    link.setAttribute('style',"font-size:69px");
 
    document.getElementById("extra-credit").appendChild(link);
})();