So a few of you might remember the addon I created for the WoT website for last year's Xmas event (thread here).
This is an updated version of that addon to work with this year's event (2020).
This is an addon tool for the Xmas event section on the WoT website homepage.
More progress bars to show total amount of hearts/gifts for each game, and how close they are from being completed.
Buttons added to both game columns to sort all the cities by:
- City name
- Remaining hearts needed (closest to completion on top)
- Remaining gifts needed (closest to completion on top)
- Button to toggle visibility of advanced stats.
- Button to show/hide all completed cities from both games.
- Button to expand/collapse the size of the game city lists (makes them really long so theres no scrollbar)
- Additional data shown when hovering over city names (DLC, Country/State)
How it works:
Note: No personal data is transmitted, accessed, and/or modified in this addon. The only data it sees and touches is the number of deliveries for each city.
The WoT website fetches updated data for the event every 10 seconds (if you keep the page open), then updates the main progress bar and the number of hearts/gifts for all the cities.
The addon is setup to also receive this data, which is then parsed, sorted, and some calculations are made, after which all the advanced stats that it adds get updated.
The script starts running when the page is loaded, but needs to wait for the site to fetch updated data (usually about 10 seconds after the page is loaded) before it displays all the advanced stuff and buttons.
There's not really a way I can get around this, as I don't have access to the data until that first fetch (the data displayed on page load is rendered by the server, not by a script).
Using the addon:
There's a couple different ways to run the script.
1: (Recommended) Using the Tapermonkey extension for your browser. https://www.tampermonkey.net (available for Chrome, Firefox, Edge, etc)
- Install the stable release of Tapermonkey for whichever browser you want to use.
- Once installed, come back to this page.
- Open the link to the script below (see "The Script") in a new tab (or current tab, im not your boss ¯\_(ツ)_/¯ )
- Tapermonkey should detect the script and show you an install screen (with the source code also displayed).
- Once the script is added, refresh the World of Trucks homepage, and it should start working it's magic.
2: (Advanced, not recommended) Paste the script into the developer tools console. (You'll need to paste in the code each time you reload the page for this option)
- Open the SOURCE CODE link for the script below (see "The Script").
- Copy everything that is shown in the code preview (where it has line numbers).
- Go to the World of Trucks website and open your browser's inspector/developer tools.
- In the console tab, paste the code in, and hit Enter.
The Script TM
Install with Tapermonkey:
https://gist.github.com/LyraGhost/d6904 ... 20.user.js
https://gist.github.com/LyraGhost/d6904 ... 7c5abccd5c
Tested on latest version of chrome, but should work in firefox and edge aswell.
Why did I make this?
Last year, nearing the end of the event, I wanted an easier way to see what cities still had deliveries left to do.
Then I added extra features because I was bored lol.
If there's any other features anyone wants to see, please let me know and I'll see what I can do.