Created
May 16, 2022 12:13
-
-
Save MewX/cdd5d2b863936e2d03c51672314cd656 to your computer and use it in GitHub Desktop.
Gazelle Freeleech Browser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Gazelle Freeleech Browser | |
// @author mewx, the_dunce | |
// @namespace http://tampermonkey.net/ | |
// @description Inserts a freeleech link in main menu for Gazelle trackers. Torrents are grouped by default. | |
// @include http*://*orpheus.network/* | |
// @include http*://*redacted.ch/* | |
// @include http*://*dicmusic.club/* | |
// @include http*://*greatposterwall.com/* | |
// @include http*://*gazellegames.net/* | |
// @include http*://*awesome-hd.me/* | |
// @include http*://*alpharatio.cc/* | |
// @include http*://*lztr.me/* | |
// @version 1.2 | |
// @grant none | |
// @license MIT | |
// ==/UserScript== | |
// Checking website. | |
var website = 'default'; | |
var currentURL = '' + window.location; | |
if (currentURL.includes('greatposterwall')) { | |
website = 'gpw'; | |
} | |
function createFreeNode() { | |
var a = document.createElement('a'); | |
a.innerHTML = 'Free'; | |
a.href = "torrents.php?freetorrent=1&group_results=1&action=advanced&searchsubmit=1"; | |
if (website == 'gpw') { | |
a.className = 'HeaderNav-link'; | |
} | |
var li = document.createElement('li'); | |
li.id = 'nav_free'; | |
if (website == 'gpw') { | |
li.className = 'HeaderNavList-item'; | |
} | |
li.appendChild(a); | |
return li; | |
} | |
// Add new navigation button. | |
var target = null; | |
if (website == 'gpw') { | |
target = document.getElementsByClassName('HeaderNav')[0].getElementsByTagName('ul')[0]; | |
} else { | |
target = document.getElementById('menu').getElementsByTagName('ul')[0]; | |
} | |
target.appendChild(createFreeNode()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment