EasyOreno

Make videos on oreno3d link directly to iwara

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==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) {}