您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
添加豆瓣直连,方便确认译名(可是豆瓣查询有频率限制很麻烦,老电影返回的数据多半还没有中文名,但是豆瓣页面却有,实在是很残疾.)
当前为
// ==UserScript== // @name rarbg添加豆瓣直连 // @version 0.1 // @description 添加豆瓣直连,方便确认译名(可是豆瓣查询有频率限制很麻烦,老电影返回的数据多半还没有中文名,但是豆瓣页面却有,实在是很残疾.) // @author You // @match https://rarbgprx.org/torrents.php* // @match https://rarbg.to/torrents.php* // @grant GM_xmlhttpRequest // @grant GM_getValue // @grant GM_setValue // @connect api.douban.com // @namespace http://greasyfork.icu/users/94864 // ==/UserScript== function get2(q,dt) { //if (!dt.title) {return ;}//console.log('无:'+w)} //console.log(dt) var c=q.cloneNode(true) c.firstChild.src='https://img3.doubanio.com/favicon.ico'; c.target="_blank"; c.firstChild.style= 'padding: 0px 5px;width: 12px;' c.href=dt.mobile_link; if (dt.alt_title) { q.parentNode.appendChild(document.createTextNode('|| '+dt.alt_title)) //var v= } q.parentNode.insertBefore(c,q); } function get(q,w) { //q.parentNode.insertBefore(c,q) var data = GM_getValue(w, false) if (data) { get2(q,data) //console.log('重复:'+w) // } else { GM_xmlhttpRequest({ method: 'GET', url: 'https://api.douban.com/v2/movie/imdb/' + w, onload: function(response) { var data = JSON.parse(response.responseText); //console.log(data) if (data.code) { console.log(data.msg) }else{ GM_setValue(w, data) get2(q,data) //console.log('获取:'+w) }; } }); } //if (c.title) {q.parentNode.insertBefore(c,q);} } var t=document.querySelectorAll('a[href*="imdb"]') //console.log(l) for (var i = 0; i <t.length; i++) { var d=t[i].attributes[0].value.match(/tt\d{7}/) get(t[i],d) }