Greasy Fork is available in English.
预览图替换成更大点的
当前为
// ==UserScript==
// @name rarbg 大预览图
// @namespace
// @version 0.2
// @description 预览图替换成更大点的
// @author You
// @match https://rarbgprx.org/torrents.php*
// @match https://rarbg.to/torrents.php*
// @grant none
// ==/UserScript==
document.onmousemove = function(k) {
var h, j
if (typeof(isIE8) != "undefined") {
h = window.event.x;
j = window.event.y;
el = window.event.target || window.event.srcElement
} else {
try {
h = k.pageX;
j = k.pageY;
el = k.target || k.srcElement
} catch (k) {
h = window.event.x;
j = window.event.y;
h += document.documentElement.scrollLeft;
j += document.documentElement.scrollTop;
el = window.event.target || window.event.srcElement
}
}
h += xoffset;
j += yoffset;
if (pop.children[0]) {
var r=document.scrollingElement.scrollTop+document.scrollingElement.clientHeight-pop.children[0].height-10
if (j>r) {
j=r
}
}
pop.style.top = j + "px";
pop.style.left = h + "px"
};
var t=document.querySelectorAll('tr[class="lista2"] > td:nth-child(2) >a:nth-child(1) ')
for (var i = 0; i <t.length; i++) {
var a=t[i].attributes.onmouseover
if (!a) {continue}
var b=a.value
if (b.match('mimages')){
a.value=b.replace('over_opt','poster_opt')
continue
}
var s=b.match(/static\/over\/([\da-f])/)
//console.log(s)
if (s){
a.value=b.replace('static/over','posters2/'+s[1])
continue
}
if (b.match('static/20')){
a.value=b.replace('_small','_banner_optimized')
continue
}
console.log("rarbg无法替换图源:"+b)
}