NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name IPT IPTorrents No Banner and some customizations at the top // @description Make IPTorrents less annoying. This is a combination of 2 scripts from here and some more stuff I added. Credits listed in the code sections // @include https://ipt-update.com/* // @include https://www.ipt-update.com/* // @include https://iptorrents.com/* // @include https://www.iptorrents.com/* // @include *iptorrents.com/* // @license GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt // @version 1 // @grant GM_addStyle // @grant GM.setValue // @grant GM_getValue // @grant GM_deleteValue // @grant GM_listValues // @grant GM_xmlhttpRequest // @grant GM_getResourceText // @grant GM_getResourceURL // @grant GM_log // @grant GM_info // @grant GM_getMetadata // @run-at document-end // ==/UserScript== //Credit masterblaster54 //https://greasyfork.org/en/users/64132-masterblaster54 document.querySelector('.bannerPlaceholder').remove(); document.querySelector('#iptStart .banner').style = 'background-color: black; height: 100px; overflow: visible;' //This is where my attempt begins document.querySelector('#iptStart .topRow').style = 'top: 5px; opacity: 1;' document.querySelector('#iptStart .stats .ql').style = 'overflow: visible; height: 25px;' var elem = document.getElementById("thdtopspacer"); elem.parentNode.removeChild(elem); for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == '-webkit-transition'){ document.styleSheets[0].cssRules[i].style.removeProperty('-webkit-transition'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == 'transition'){ document.styleSheets[0].cssRules[i].style.removeProperty('transition'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == '-webkit-transform'){ document.styleSheets[0].cssRules[i].style.removeProperty('-webkit-transform'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == 'backdrop-filter'){ document.styleSheets[0].cssRules[i].style.removeProperty('backdrop-filter'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == '-webkit-animation'){ document.styleSheets[0].cssRules[i].style.removeProperty('-webkit-animation'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == 'animation'){ document.styleSheets[0].cssRules[i].style.removeProperty('animation'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == '-ms-transform'){ document.styleSheets[0].cssRules[i].style.removeProperty('-ms-transform'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == '-webkit-appearance'){ document.styleSheets[0].cssRules[i].style.removeProperty('-webkit-appearance'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == '-webkit-backdrop-filter'){ document.styleSheets[0].cssRules[i].style.removeProperty('-webkit-backdrop-filter'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == 'opacity'){ document.styleSheets[0].cssRules[i].style.removeProperty('opacity'); break; } } for(let i = 0; i < document.styleSheets[0].cssRules.length; ++i){ if(document.styleSheets[0].cssRules[i].selectorText == 'text-shadow'){ document.styleSheets[0].cssRules[i].style.removeProperty('text-shadow'); break; } } //This is where my attempt ends //Credit furwasalreadytaken //https://greasyfork.org/en/users/151789-furwasalreadytaken function execute(body) { var el = document.createElement("script"); el.textContent = "(" + body + ")();"; document.body.appendChild(el); return el; } execute(function() { // make the banner link to the torrents page, not donate $(".banner a:first").attr('href', 'https://' + window.location.host + '/t'); // hide the donate button from the main menu $(".butRow a:last").remove(); // hide the "double your upload" banner $('td a[href="/donate.php"]').remove(); // hide the lottery points indictator thing // FIXME: is there not a huge banner ala double your upload when the lottery is active? $('.stats div:nth-child(2) a[href="/lottery.php"]').remove(); // hide the IPT Browser button $('.topRow a:contains("IPT Browser")').remove(); // hide the sketchy-ass non-tls mirrors stuff $('.topRow a:contains("Mirrors")').remove(); $('td a[href="/p/4334880"]').remove(); // "UK members can't access IPT? Use Mirrors!" banner // fix their stupid inconsistent 1337 spelling // column, row, new text var table = [ [5, 3, "Apps"], [5, 4, "Apps/Non-English"], [5, 5, "Audiobooks"], [5, 11, "Magazines/Newspapers"] ]; for (var i = 0; i < table.length; i++) { // does javascript *really* not have a .format method? var t = table[i]; $("td.bottom:nth-child("+t[0]+") label:nth-child("+t[1]+") span a").html(t[2]); } });