您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Add direct links to RARBG & TPB from Douban.
当前为
// ==UserScript== // @name Douban2RARBG // @namespace https://mogeko.me // @version 0.1 // @description Add direct links to RARBG & TPB from Douban. // @author Mogeko // @match https://movie.douban.com/subject/* // @icon https://img9.doubanio.com/favicon.ico // @grant none // ==/UserScript== const SITE_DATA = [ ["RARBG", "https://rarbgmirror.com/torrents.php?imdb="], ["TPB", "https://thepiratebay.org/search.php?q="] ]; (function() { 'use strict'; const infoNode = document.querySelector("#info"); const itemNode = document.createElement("span"); const l_Node = document.createElement("span"); const r_Node = document.createElement("span"); const br = document.createElement("br"); const imdb = infoNode.innerHTML.match(/tt[0-9]{4,}/)[0]; l_Node.className = "pl"; l_Node.innerHTML = "资源: "; SITE_DATA.map(site => { const link = document.createElement("a"); link.textContent = site[0]; link.href = site[1] + imdb; link.target="_blank"; return link; }).forEach((node, index, array) => { r_Node.appendChild(node); if (index !== array.length - 1) { r_Node.innerHTML += " / "; } }); itemNode.appendChild(l_Node); itemNode.appendChild(r_Node); infoNode.appendChild(itemNode); infoNode.appendChild(br); })();