Literotica Fixer

depaginates literotica stories and removes CSS

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        Literotica Fixer
// @namespace   [email protected]
// @description depaginates literotica stories and removes CSS
// @include     https://www.literotica.com/s/*
// @include     https://literotica.com/s/*
// @version     1
// @grant       none
// @require     http://code.jquery.com/jquery-latest.js
// ==/UserScript==

var divCount = 1;
var pages = Number($(".b-pager-caption-t").text().split(" ")[0]);
var i = pages - 1;
function litFix() {
	if (window.location.toString().includes("?") === false) {
	window.location = window.location + "?page=" + pages;
	}
	if (pages > 1) {
		$(".b-story-body-x").prepend("<br>");
		$(".b-story-body-x").prepend("<div></div>");
		$(".b-story-body-x > div:nth-child("+divCount+")").load(window.location.toString().split("=")[0] + "=" + i +" .b-story-body-x");
		i--;
		while (i > 0) {
			litFix();
		}
	}
	$(".b-pager").remove();
}

function removeCSS() {
	for (var i = document.styleSheets.length - 1; i >= 0; i--) {
		document.styleSheets[i].disabled = true;
	}
}

litFix();
removeCSS();