Closed mammothb closed 6 years ago
It looks nice. I think before it is added it should also cache the table and only check about once every 12 hours to respect the kittdex servers.
Added caching function. The code now fetches from the site every 12 hours or if nothing has been fetched before. if we are on a Kitty page, the attribute color are updated again if we have to fetch new values
@neuhaus I believe that was done here https://github.com/HaJaeKyung/KittyExtension/pull/11/commits/89432ebf8a67b86be3626f5df81d3dea9cbf4a02#diff-3205c0ded576131ea255ad2bd38b0fb2R82 If that wasn't the right way, could you please point me to some resources on how to do it? It's my first time writing something like this
No longer needed with the new built in cattributes API. Thanks for your effort on this.
…x.com/cattributes
Original table of frequency
tbl
only gets updated if fetching was successful. Current the cattribute frequency is taken from thewidth
of eachli
element.Note Color code calculation for rarity may need to be updated.