Multi-script Para TMO

Quiero Ver Mi MANGA!!!!

Stan na 11-04-2024. Zobacz najnowsza wersja.

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

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

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 Multi-script Para TMO
// @namespace Mother Of Mangas
// @version 3.05
// @description Quiero Ver Mi MANGA!!!!
// @homepageURL      https://greatest.deepsurf.us/es/scripts/430361-multi-script-para-tmo
// @icon         https://visortmo.com/favicon/android-chrome-192x192.png
// @author IRhoAias
// @connect        *
// @grant          GM.getResourceUrl
// @grant          GM_xmlhttpRequest
// @grant          GM_getResourceURL
// @license Copyright IRhoAias
// @match *://*lectortmo.com/*
// @match *://*visortmo.com/*
// @exclude *://*visortmo.com/view_uploads/*

// @match *://*/*

// @run-at       document-idle

// ==/UserScript==

//PAGE

(function() {
    'use strict';

    var Regex12 = /\/[0-9a-zA-Z]{12}\//
    var Regex32 = /\/[0-9a-zA-Z]{13,32}\//
    var News = /\/news\//;
    var Juegos = /\/juegos\//;

    function extractUrl() {
        return window.location.href;
    }
    function extractPathname() {
        return window.location.pathname;
    }
    function isTMO() {
        const url = extractUrl();
        return url.includes('visortmo.com');
    }
    function TMOUploads() {
        const url = extractUrl();
        return url.includes('visortmo.com/view_uploads');
    }

    function CallBack() {
        const pathname = extractPathname();
        if (Regex12.test(pathname) && (News.test(pathname)) && !isTMO() && !TMOUploads()) {
            window.history.back();
            setTimeout(function() {
                console.log('Backeo Completo.');
            }, 1500);
        }
    }

    function redirectTMO() {
        const pathname = extractPathname();
        if (Regex32.test(pathname) && (News.test(pathname)) && !isTMO()) {
            location.href = location.href.replace(`${location.host}/news/${location.pathname.split("/")[2]}/cascade`, `visortmo.com/viewer/${location.pathname.split("/")[2]}/cascade`);
            setTimeout(function() {
                console.log('Redireccion Completada.');
            }, 1000);
        }
    }

    function GamePath() {
        const pathname = extractPathname();
        if (Regex32.test(pathname) && (Juegos.test(pathname)) && !isTMO()) {
            location.href = location.href.replace("juegostmo.com/juegos/", "visortmo.com/viewer/");
            setTimeout(function() {
                console.log('Redireccion Completada.');
            }, 1000);
        }
    }
    function CascadeR() {
    if ((location.href).includes("cascade1")) {
    location.href = location.href.replace(
        /cascade1*/, "cascade"
      );
  }
}
    function executeFunctions() {
        redirectTMO();
        setTimeout(CascadeR, 500);
        setTimeout(GamePath, 500);
        setTimeout(CallBack, 1500);
    }

    executeFunctions();
})();

//✙[̲̅S][̲̅c][̲̅r][̲̅i][̲̅p][̲̅t]✙
//▢▇▇▇▇▇▇▇▇▇▇▇▇▇▇▢
//             ╭━╮╭━╮   ╭╮ ╱
//             ╰━┫╰━┫   ╰╯╱╭╮
//             ╰━╯╰━╯   ╱ ╰╯
//            COMPLETE



  document.addEventListener('keydown', logKey);
  function logKey(e) {
    if(e.code == "ArrowRight"){
        location = document.querySelector(".chapter-next").querySelector("a").href;
    }
    if(e.code == "ArrowLeft"){
        location = document.querySelector(".chapter-prev").querySelector("a").href;
    }
  }