UD Radio Accelerator

Removes one step (and thus one AP and IP) from retuning a radio reciever.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name		UD Radio Accelerator
// @description		Removes one step (and thus one AP and IP) from retuning a radio reciever.
// @include		http://urbandead.com/map.cgi*
// @include		http://www.urbandead.com/map.cgi*
// @exclude		http://urbandead.com/map.cgi?logout
// @exclude		http://www.urbandead.com/map.cgi?logout
// @version 0.0.1.20210919202135
// @namespace https://greasyfork.org/users/817108
// ==/UserScript==

/* Urban Dead Radio Accelerator
 * v1.0
 *
 * Copyright (C) 2008 Ville Jokela -- [email protected]
 *
 * Released under the terms of the GNU GPL V2, which can be found at http://www.gnu.org/copyleft/gpl.html
 */

function askForFreq(evt) {
	var newFreq = prompt('Input new frequency', '');
	var address = location.protocol + '//' + location.host + '/map.cgi?newfreq=' + newFreq + '&oldfreq=' + evt.target.parentNode.lastChild.value;
	location.assign(address);
}

function insertCheckers() {
	 var radios = document.evaluate('//input[@value="radio"]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
	 for (var i = 0; i < radios.snapshotLength; i++) {
	 	var form = radios.snapshotItem(i).parentNode;
		form.firstChild.type = 'button';
		form.addEventListener('click', function(evt) { askForFreq(evt); }, true);
	 }
}

insertCheckers();