Script Summary: Remove the red color from the resources stored on a moon.
Version: 2.00
In the redesign, the numbers that indicate the amount of resources on the current planet are colored yellow, if more than 90% of the storage space for the corresponding resource is full and are colored red if there is no more available storage space for the corresponding resource. This is a nice reminder that the storages are getting full (or are already full). It is important information, because once a storage gets filled up completely, the mines stop producing the corresponding resource.
However, there cannot be any mines on the moons. This is why building storages there is a waste of precious space - and it is also why this color-coded indication is pointless there. Worse, it is annoying, because the red color suggests that something is wrong - and on a moon without any storages the color will turn red if there are more than 10.000 units of a resource.
In addition, there is a minor bug in the game. In the tooltip that shows the energy balance on the current planet or moon when one hovers the mouse over the Energy icon, the numbers turn red if the amount of unused energy is exactly zero. This is wrong - the numbers should turn red only if the energy balance is negative.
This little script solves both of the above problems. Unfortunately, it is not possible to implement it as a Stylish script (and, therefore, have it execute before the page is rendered on the screen by the browser), so the original red color will be seen for a short time (usually - less than a second) when the page is redrawn.
2011-04-29. Version 1.01. When on a moon, the color of the resource numbers was not removed on the Facilities and Recruit Officers pages. Fixed. Also, while the color was removed from the numbers that are always displayed on the page (the "ticking resources"), it wasn't removed from the tooltips that appeared when the mouse was hovered over the icon of the corresponding resource. Fixed.
2011-05-26. Version 1.02. Made the script compatible with version 2.1.3 of OGame.
2011-05-27. Version 1.03. The update had lost the ability to remove the red color from the tooltip of the energy icon, if the energy balance was 0. Fixed.
2011-05-28. Version 1.04. The method I used to determine whether the player is currently on a moon didn't work (for instance, it would trigger if the player resided on a planet with a full metal storage). I hate Gameforge. Trying something else now (although I really don't like digging into unsafeWindow). Hopefully, it will work properly this time.
2011-05-31. Version 1.05. Improved the compatibility with Antigame. (The color of the energy balance in the information Antigame takes from the energy box tooltip was not removed, if that balance was "0 / 0". This happened if this script was installed after Antigame. Fixed.)
2011-07-14. Version 1.06. In version 2.2.3 of the game, the structure of the tooltips of the resource icons changed and the script was no longer removing the red color from them. Fixed.
2011-12-20. Version 1.07. Changed the script to make it compatible with version 3.0.1 of the game (where it wasn't working in Galaxy view).
2012-04-25. Version 1.08. The script wasn't working on the Galaxy page. Not sure if this was a bug in the script all along or whether it was an incompatibility introduced by OGame version 3.2 or 4.0. Whatever. It should work now.
2012-05-24. Version 1.09. The script wasn't working on the new Shop page added in OGame 4.*. It does now. Thanks to BlackCat for explaining me why it didn't and how to do it there.
2012-06-24. Version 1.10. The script still wasn't working correctly on the Shop page. Entirely my fault this time. Fixed.
2012-07-04. Version 1.11. The game updates the resources during the bidding on the Auctioneer page, causing them to be colored again. Fixed.
2012-10-29. Version 2.00. Completely rewrote the script, in order to make it able to work in OGame version 5.x. Unfortunately, as a result, it no longer works in previous versions of the game. This shouldn't be a problem, though, since all game servers have switched to version 5.x by now.



