☰

JavDB2MissAV

JavDB快速跳转到MissAV在线播放页

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.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         JavDB2MissAV
// @namespace    https://gitee.com/mirrors406
// @version      2025.11.08
// @description  JavDB快速跳转到MissAV在线播放页
// @author       Mirrors406
// @match        https://javdb.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
  "use strict";

  const isDetailPage = location.href.includes("/v/");

  const getMissAvSearch = (name) => `https://missav.ai/search/${name}`;
  const getMissAvDetail = (name) => `https://missav.ai/${name}`;

  /**处理详情页 */
  const handleDetailPage = () => {
    if (!isDetailPage) return;

    const nameDom = document
      .querySelector(".movie-panel-info")
      .querySelector(".first-block");

    const copyBtn = nameDom.querySelector(".copy-to-clipboard");
    const name = copyBtn.getAttribute("data-clipboard-text");

    const a = document.createElement("a");
    a.target = "_blank";
    a.className = "button is-white";
    a.style.color = "rgb(238, 97, 132)";
    a.textContent = "MissAV";

    a.href = getMissAvDetail(name);
    a.addEventListener("contextmenu", (e) => {
      e.preventDefault();
      window.open(getMissAvSearch(name));
    });

    nameDom.appendChild(a);
  };

  /**处理列表页 */
  const handleListPage = () => {
    if (isDetailPage) return;

    const handler = (item) => {
      const box = item.querySelector(":scope>.box");
      box.target = "_blank";

      const name = item
        .querySelector(".video-title")
        .querySelector("strong").innerText;

      const tagsDom = item.querySelector(".tags");

      const a = document.createElement("a");
      a.target = "_blank";
      a.className = "tag";
      a.style.marginLeft = "8px";
      a.style.color = "#fff";
      a.style.background = "rgb(238, 97, 132)";
      a.textContent = "MissAV";

      a.href = getMissAvDetail(name);
      a.addEventListener("contextmenu", (e) => {
        e.preventDefault();
        window.open(getMissAvSearch(name));
      });

      tagsDom.appendChild(a);
    };

    const list = document
      .querySelector(".movie-list")
      .querySelectorAll(":scope>.item");

    list.forEach((item) => {
      try {
        handler(item);
      } catch (error) {
        console.error(error);
      }
    });
  };

  handleDetailPage();
  handleListPage();
  console.log("---- JavDB To MissAV -----");
})();