EasyOreno

Make videos on oreno3d link directly to iwara

Verze ze dne 19. 05. 2023. Zobrazit nejnovější verzi.

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

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 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        EasyOreno
// @namespace   Violentmonkey Scripts
// @match       https://oreno3d.com/*
// @grant       none
// @license     MIT
// @version     1.0
// @author      -
// @description Make videos on oreno3d link directly to iwara
// ==/UserScript==

function swapHref() {
  const mainGrid = document.querySelector("body > div.container > main > div > div.g-main-grid").querySelectorAll("article")
  const domParser = new DOMParser();

  for (var i = 0; i < mainGrid.length; i++){
    childLink = mainGrid[i].querySelector("a").getAttribute("href");

    (function(index) {
      fetch(childLink)
        .then(response => response.text())
        .then(sourceHTML => {
          const HTMLPage = domParser.parseFromString(sourceHTML, "text/html");
          iwaraLink = HTMLPage.querySelector('a[href*="' + "iwara" + '"]').href;

          mainGrid[index].querySelector("a").href = iwaraLink;
        })
        .catch(error => {
          console.error(`Error for URL ${index}:`, error);
        });
    })(i);
  }
}

try{
  swapHref();
} catch(error) {}