Gazelle Freeleech Browser

Inserts a freeleech link in main menu for Gazelle trackers. Torrents are grouped by default.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==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());