mcstories fixer

depaginates stories on mcstories.com

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        mcstories fixer
// @namespace   [email protected]
// @include     http://www.mcstories.com/*/index.html
// @include     https://www.mcstories.com/*/index.html
// @include     http://mcstories.com/*/index.html
// @include     https://mcstories.com/*/index.html
// @exclude     http://www.mcstories.com/Titles/index.html
// @exclude     http://www.mcstories.com/Authors/index.html
// @exclude     http://www.mcstories.com/Tags/index.html
// @exclude     http://www.mcstories.com/ReadersPicks/index.html
// @version     1
// @description depaginates stories on mcstories.com
// @grant       none
// @require     http://code.jquery.com/jquery-latest.js
// ==/UserScript==

var link = window.location.toString().split("/");
function fixMC() {
	if ($("tbody").length != 0) {
		var chapters = $("#index > tbody:nth-child(1) > tr").length - 1;
		for (let i = 2; i <= chapters + 1; i++) {
			$("#index > tbody:nth-child(1) > tr:nth-child("+i+")").load("http://www.mcstories.com/"+link[3]+"/"+link[3]+(i-1)+".html #mcstories");
		} 
	} else {
		$(".chapter").load("http://www.mcstories.com/"+link[3]+"/"+link[3]+".html #mcstories");
	}
	$("#index > tbody:nth-child(1) > tr:nth-child(1)").remove();
}

fixMC();

function removeCSS() {
  for (let i = 0; i < document.styleSheets.length; i++) {
		document.styleSheets[i].disabled = true;
	}	
}

removeCSS();