您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Add sidebar with torrent info from top info box
// ==UserScript== // @name InfoInSidebar // @description Add sidebar with torrent info from top info box // @version 1.0 // @author Monkeys // @namespace empornium.me // @include *torrents.empornium.me/torrents.php?id=* // @grant none // ==/UserScript== (function(){ var cells = document.getElementById("top_info").querySelectorAll('td'); var className = "sideInfo"; //the orginal empornium class to make it match the page elements var styleInfo = "position: fixed; bottom: 1em; right: 1em;"; //additional style to put it in the correct position var outputInfo; //html as a string to be put in the div for the sidebar var outputDiv = document.createElement('div'); outputDiv.setAttribute('style', styleInfo); outputDiv.className='top_info'; outputInfo = "<table>"; for (var ii = 0; ii < cells.length; ii++) {//go through each of the cell in the top info table and build the side bar table from them var thisCell = cells[ii].innerHTML; thisCell = thisCell.replace('<span class="time"', '</td></tr><tr><td><span class="time"') outputInfo += "<tr><td>"+thisCell+"</td></tr>"; } outputInfo += "</table>"; outputDiv.innerHTML = outputInfo; document.body.appendChild(outputDiv); //doesn't really matter where we put the new element since it has absolute positioning })();