Multi-script Para TMO

Quiero Ver Mi MANGA!!!!

As of 11.04.2024. See апошняя версія.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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;
    }
  }