Transformania Time Focus Text Boxes

For Transformania Time multiplayer edition. Places focus in some text entry fields as soon as the page loads. Saves you some clicks.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το 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         Transformania Time Focus Text Boxes
// @namespace    http://steamcommunity.com/id/siggo/
// @version      1.0.1
// @description  For Transformania Time multiplayer edition. Places focus in some text entry fields as soon as the page loads. Saves you some clicks.
// @author       Prios
// @match        https://www.transformaniatime.com/pvp/playerlookup
// @match    	 https://www.transformaniatime.com/pvp/myfriends
// @match        https://www.transformaniatime.com/PvP/Shout
// @match        https://www.transformaniatime.com/pvp/shout
// @match    	 https://www.transformaniatime.com/pvp/myskills
// @match    	 https://www.transformaniatime.com/messages/write*
// @match		 https://www.transformaniatime.com/item/selfcast
// @match		 https://www.transformaniatime.com/Info/GearTool
// @match		 https://www.transformaniatime.com/npc/lorekeeperlearnspell*
// @grant        none
// @license		 MIT
// ==/UserScript==

(function() {
    'use strict';

	var thisURL = window.location.pathname;
	var textBox;

	switch (thisURL) { // goofy but works and is easy to understand
		case '/pvp/playerlookup':
			textBox = $( '#FirstName' );
		break;
		case '/pvp/myfriends':
			textBox = $( '[type="search"]' );
		break;
		case '/PvP/Shout':
			textBox = $( '#Message' );
		break;
        case '/pvp/shout':
            textBox = $( '#Message' );
        break;
		case '/pvp/myskills':
			textBox = $( '[type="search"]' );
		break;
		case '/messages/write':
			textBox = $( '#MessageText' );
		break;
		case '/item/selfcast':
			textBox = $( '[type="search"]' );
		break;
		case '/Info/GearTool':
			textBox = $( '[type="search"]' );
		break;
		case '/npc/lorekeeperlearnspell':
			textBox = $( '[type="search"]' );
	}

	textBox[0].focus();

})();