What.CD Extended Main Menu

Injects links to better.php and logchecker.php into the main menu

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name           What.CD Extended Main Menu
// @namespace      https://greasyfork.org/users/3348-xant1k
// @description    Injects links to better.php and logchecker.php into the main menu
// @include        https://what.cd/*
// @include        https://ssl.what.cd/*
// @version        1.0
// ==/UserScript==

(function() {
	var target = document.getElementById('menu').getElementsByTagName('ul')[0]; /* Main menu */
	/*var target = document.getElementById('userinfo_minor');*/ /* User menu */


	/* Insert logchecker link */

	var lc_item = document.createElement('li');

	lc_item.id = 'nav_logchecker';

	lc_item.innerHTML = '<a href="logchecker.php">Logchecker</a>';

	target.appendChild(lc_item);


	/* Insert better link */

	var better_item = document.createElement('li');

	better_item.id = 'nav_better';

	better_item.innerHTML = '<a href="better.php">Better</a>';

	target.appendChild(better_item);
})();