eswak / chrome-ogame-ui-extension

A Google Chrome extension that enhances the OGame user interface by adding elements into it.
18 stars 23 forks source link

fixed bug when resource text is too long, the violet text is overlapping #81

Closed shonderdos closed 7 years ago

shonderdos commented 7 years ago

This fixes issue #16

Not sure if you like it but I'm looping over the resourcesArr instead of having everything duplicated 3 times.

PS: do we need to add Time untill full and Total storage time to a translation file?

eswak commented 7 years ago

sure no problem for looping, it's better ^^ you can see it in several files already. most of the time I use forEach though :

resourcesArr.forEach(function (resource) {
  // …
  changeTooltip($('#' + resource + '_box'), tempTooltip);
});

We need to add a translation key yes What would be the turkish string for it ?

I'll handle the translation key thing, thanks for the submission ^^

Maybe i'll add a try/catch too around the JSON.parse too because this part of the code doesn't seem super trusty to me