Transformania Time Map Tweak

For Transformania Time multplayer edition. Makes enchantment percentages on the enchantment map easier to read. Starts the enchantment map view closer to the center of town. Starts the standard map centered on the player's location.

Ekde 2023/08/05. Vidu La ĝisdata versio.

// ==UserScript==
// @name         Transformania Time Map Tweak
// @namespace	 http://steamcommunity.com/id/siggo/
// @version      1.0.1
// @description  For Transformania Time multplayer edition. Makes enchantment percentages on the enchantment map easier to read. Starts the enchantment map view closer to the center of town. Starts the standard map centered on the player's location.
// @author       Prios
// @match        https://www.transformaniatime.com/pvp/worldmap?showEnchant=*
// @grant        none
// @license		 MIT
// ==/UserScript==

(function() {
    'use strict';

	var thisURL = window.location.href;
	var enchantmentMapOffset = 0;

	if ( thisURL === 'https://www.transformaniatime.com/pvp/worldmap?showEnchant=true' ) {
		$( '.mapcelltext' )
			.css({'background-color': 'lightgray', 'background-blend-mode': 'screen', 'font-weight': 'bold'})
        ;
        $( '.mapcell' )
			[enchantmentMapOffset].scrollIntoView({behavior:'smooth', block:'center', inline:'center'})
		;
	}
	else if ( thisURL === 'https://www.transformaniatime.com/pvp/worldmap?showEnchant=false' ) {
		$( '[style*="lightpink"]' )
			[0].scrollIntoView({behavior:'smooth', block:'center', inline:'center'})
		;
	}

})();