您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes titles longer on the torrent page and optionally enables the detail box when available.
当前为
// ==UserScript== // @name 1337x - Torrent page improvements // @namespace NotNeo // @version 1.4.2 // @description Makes titles longer on the torrent page and optionally enables the detail box when available. // @author NotNeo // @include http*://1337x.to/account // @include http*://1337x.to/torrent/* // @include http*://1337x.st/account // @include http*://1337x.st/torrent/* // @include http*://1337x.ws/account // @include http*://1337x.ws/torrent/* // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // ==/UserScript== var hideStreamButt = false; var hideAnonButt = false; var usingDetailBox = true; //setting to default //GM_deleteValue("usingDetailBox"); if( GM_getValue("usingDetailBox") != null ) { usingDetailBox = GM_getValue("usingDetailBox"); //overriding with saved settings if there is one } if( GM_getValue("hideAnonButt") != null ) { hideAnonButt = GM_getValue("hideAnonButt"); //overriding with saved settings if there is one } if( GM_getValue("hideStreamButt") != null ) { hideStreamButt = GM_getValue("hideStreamButt"); //overriding with saved settings if there is one } if(window.location.href.indexOf("1337x.to/account") >= 0 || window.location.href.indexOf("1337x.st/account") >= 0 || window.location.href.indexOf("1337x.ws/account") >= 0) { //if on settings page document.getElementById("settings").innerHTML = '<br><input type="checkbox" value="1" name="useDetail" id="useDetailCheckbox" style="transform: scale(1.5);"> <label for="useDetailCheckbox">Show detail box for torrents, when available.</label><br>' + '<input type="checkbox" value="1" name="hideAnon" id="hideAnonCheckbox" style="transform: scale(1.5);"> <label for="hideAnonCheckbox">Hide the "Anonymous Download" button</label><br>' + '<input type="checkbox" value="1" name="hideStream" id="hideStreamCheckbox" style="transform: scale(1.5);"> <label for="hideStreamCheckbox">Hide the "Play Now (Stream)" button</label><br>' + document.getElementById("settings").innerHTML; document.getElementById("useDetailCheckbox").checked = usingDetailBox; //settings checkbox checked value to saved value (or default, if none are saved) document.getElementById("hideAnonCheckbox").checked = hideAnonButt; //settings checkbox checked value to saved value (or default, if none are saved) document.getElementById("hideStreamCheckbox").checked = hideStreamButt; //settings checkbox checked value to saved value (or default, if none are saved) document.getElementById("useDetailCheckbox").onchange = function() { //on value change usingDetailBox = document.getElementById("useDetailCheckbox").checked; //settings current value to the the new GM_setValue("usingDetailBox", usingDetailBox); //saving current value }; document.getElementById("hideAnonCheckbox").onchange = function() { //on value change hideAnonButt = document.getElementById("hideAnonCheckbox").checked; //settings current value to the the new GM_setValue("hideAnonButt", hideAnonButt); //saving current value }; document.getElementById("hideStreamCheckbox").onchange = function() { //on value change hideStreamButt = document.getElementById("hideStreamCheckbox").checked; //settings current value to the the new GM_setValue("hideStreamButt", hideStreamButt); //saving current value }; } else { var title = document.getElementsByTagName("title")[0].textContent; title = title.substring(9, title.length-16); var titleArea = document.getElementsByClassName("box-info-heading")[0]; if(titleArea.getElementsByTagName("span").length == 2 && title.length > 100) { title = title.substring(0, 100) + "..."; } else if(titleArea.getElementsByTagName("span").length >= 3 && title.length > 85) { title = title.substring(0, 85) + "..."; } titleArea.getElementsByTagName("h1")[0].textContent = title; if(usingDetailBox) { var realDetailBox = document.getElementsByClassName("torrent-detail")[0]; if(realDetailBox !== undefined) { if(!(realDetailBox.offsetWidth > 0 && realDetailBox.offsetHeight > 0)) { //if realDetailBox is not visible, make own var datHTML = realDetailBox.innerHTML; document.getElementsByClassName("torrent-category-detail")[0].innerHTML += '<div class="torrent-detail clearfix" style="display: inline-block; position: relative; margin-top: 10px; width: 100%;">'+datHTML+'</div>'; } } } if(hideStreamButt) { try { document.querySelector("div.torrent-category-detail > ul.download-links-dontblock > li > a > span > i.flaticon-stream").parentNode.parentNode.parentNode.style.display = 'none'; } catch(err) { try { document.querySelector("div.torrent-category-detail > ul.download-links-dontblock > li > a > span > i.flaticon-direct-download").parentNode.parentNode.parentNode.style.display = 'none'; } catch(err) { alert("Error getting Stream button. Please report this via PM to \"NotNeo\""); } } } if(hideAnonButt) { try { document.querySelector("div.torrent-category-detail > ul.download-links-dontblock > li > a > span > i.flaticon-shield-sat").parentNode.parentNode.parentNode.style.display = 'none'; } catch(err) { alert("Error getting Anon download button. Please report this via PM to \"NotNeo\""); } } }
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址