Skip to content

Commit

Permalink
Weather: Fixed widget failing to load when using the Microsoft icon pack
Browse files Browse the repository at this point in the history
Unfortunately, besides updating the code to work with Google's latest
changes, commit 2a1aad2 introduced a bug when using the Microsoft
icon pack that prevented the widget from loading. Thus, this commit:

* Fixes that (there was no need for `getElementById('wob_tci').children[0]`
apparently)
* Besides checking for blobs in `src`, it also checks for image names,
since `wob_tci` (main icon) still contains a URL, not a blob
* Fixes `wob_tci` to update with proper icon when interacting with the
widget, for example when selecting a day with a different forecast than
the current conditions
* Simplifies some logic, seems the widget works fine without it

Hopefully this fixes the widget properly.
  • Loading branch information
valinet committed Apr 22, 2023
1 parent 0344a5e commit 968d969
Showing 1 changed file with 33 additions and 108 deletions.
Loading

0 comments on commit 968d969

Please sign in to comment.