NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name m-team封面预览图调整 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 调整预览图位置,防止遮挡预览小图 // @author woodj // @license MIT // @include *://tp.m-team.cc/*adult.php* // @include *://tp.m-team.cc/*torrents.php* // @include *://tp.m-team.cc/*movie.php* // @icon https://tp.m-team.cc/logo.png // ==/UserScript== (function () { 'use strict'; // Your code here... function showmenu2(obj, objname, url) { for (var rowname in ShowDivList) { $(rowname).style.display = 'none'; } if (!url) return false; if (!$(objname)) { var objdiv = document.createElement("div"); objdiv.id = objname; } else { var objdiv = $(objname); } var target = obj; var pos = new CPos(target.offsetLeft, target.offsetTop); var target = target.offsetParent; while (target) { pos.x += target.offsetLeft; pos.y += target.offsetTop; target = target.offsetParent } objdiv.style.display = 'block'; objdiv.onmousemove = function () { setmenutime(); }; objdiv.onmouseout = function () { hiddmenu(objname); }; objdiv.onclick = function () { objdiv.style.display = 'none'; }; objdiv.style.position = 'absolute'; objdiv.style.left = (pos.x + 75) + 'px'; objdiv.style.top = (pos.y + 25) + 'px'; if (!$(objname + '_img')) { objdiv.innerHTML = ''; var picdiv = document.createElement("img"); picdiv.setAttribute('src', url); picdiv.setAttribute('id', objname + '_img'); //picdiv.style.display = 'none'; picdiv.onload = function () { //picdiv.style.display = ''; resource_drawimage(objname + '_img', 650, 800); }; objdiv.appendChild(picdiv); } document.body.appendChild(objdiv); ShowDivList[objname] = 1; MenuOutTime = 1; return false; } function change() { showmenu = showmenu2; } change(); console.log("wood"); })();