您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
https://yunpan.12356.ren/ 是一个影视资源聚合站点。安装脚本后豆瓣电影标题旁会显示【查看免费片源】按钮。
// ==UserScript== // @name 豆瓣电影 免费片源 // @namespace https://yunpan.12356.ren/ // @version 1.8.0 // @author yunpan.12356.ren // @match *://movie.douban.com/subject/* // @description https://yunpan.12356.ren/ 是一个影视资源聚合站点。安装脚本后豆瓣电影标题旁会显示【查看免费片源】按钮。 // @license MIT // ==/UserScript== (function () { var host = location.hostname; if (host === 'movie.douban.com') { const title = encodeURIComponent(document.querySelector('title').innerText.replace(/(^\s*)|(\s*$)/g, '').replace(' (豆瓣)', '')); const subjectwrap = document.querySelector('h1'); const subject = document.querySelector('.year'); if (!subjectwrap || !subject) { return; } const sectl = document.createElement('span'); subjectwrap.insertBefore(sectl, subject.nextSibling); sectl.insertAdjacentHTML('beforebegin', `<style>.cupfox{vertical-align: middle;color: red !important; background-color: gold !important; padding: 5px 10px;border-radius: 22px;} .cupfox:hover{background: blue;}</style> <a href="https://yunpan.12356.ren/?q=${title}" class="cupfox" target="_blank">查看免费片源</a>` ); } })();