您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
在豆瓣电影/电视剧页面显示夸克网盘资源搜索结果。目前推荐夸克网盘vip使用。
// ==UserScript== // @name Search resources in Quark Disk on Douban // @name:zh-CN 豆瓣页面搜索夸克网盘资源 // @namespace https://github.com/laiczhang // @description 在豆瓣电影/电视剧页面显示夸克网盘资源搜索结果。目前推荐夸克网盘vip使用。 // @license GPL 3.0 // @version 0.2 // @author laiczhang // @match https://movie.douban.com/subject/* // @grant GM_xmlhttpRequest // ==/UserScript== (function() { 'use strict'; // 获取电影/电视剧名称 const movieTitle = document.querySelector('h1 span:first-child').textContent.trim(); // 构建请求体 const requestBody = { "style": "get", "datasrc": "search", "query": { "id": "", "datetime": "", "courseid": 1, "categoryid": "", "filetypeid": "", "filetype": "", "reportid": "", "validid": "", "searchtext": movieTitle }, "page": { "pageSize": 10, "pageIndex": 1 }, "order": { "prop": "sort", "order": "desc" }, "message": "请求资源列表数据" }; const newDiv = document.createElement('div'); // 发送 POST 请求 GM_xmlhttpRequest({ method: "POST", url: "https://v.funletu.com/search", data: JSON.stringify(requestBody), headers: { "Content-Type": "application/json" }, onload: function(response) { newDiv.style.marginBottom = '20px'; newDiv.style.padding = '10px'; newDiv.style.border = '1px solid #ddd'; console.log('total',JSON.parse(response.responseText)) // 将响应结果添加到新的 div 中 newDiv.innerHTML = `<h3>去其他地方看看:</h3> <a href="https://pan.funletu.com/#/s/${movieTitle}/1.html" target="_blank"> <pre>趣盘搜:${JSON.parse(response.responseText).total | 0}条结果</pre></a>`; // 将新的 div 插入到目标位置 const targetDiv = document.getElementById('subject-doulist'); targetDiv.parentNode.insertBefore(newDiv, targetDiv); }, onerror: function(error) { newDiv.innerHTML = `<h3>Funletu 搜索结果:</h3><p>请求失败</p>`; console.error("Request error:", error); } }); })();