andy-portmen / country-flags

adds a toolbar button to browser address-bar displaying current physical location of visited website
https://webextension.org/listing/country-flags.html
Mozilla Public License 2.0
133 stars 35 forks source link

Extension doesn't always initialize on browser launch homepage #24

Closed narcolepticinsomniac closed 6 years ago

narcolepticinsomniac commented 6 years ago

Similar to: https://github.com/Tampermonkey/tampermonkey/issues/345 so perhaps useful.

andy-portmen commented 6 years ago

do you get the error flag?

narcolepticinsomniac commented 6 years ago

IDK what the error flag is, but it's the same grayscale "9" icon that shows on chrome:// URLs. Just like with TM, or Stylish long before that, it doesn't fail every time, it's more a crap-shoot. I have Google as my homepage, and sometimes when I launch the browser, there's an American flag, sometimes the script fails to load and there's the grayscale "9". Not the end of the world, but I consider the script sometimes failing on browser launch a bug. Other than that, handy extension BTW.

andy-portmen commented 6 years ago

Okay got it. Seems like the background script is loading with delay. I added a new module to scan the existing tabs and update the icon when the extension is fully loaded.

Thanks for the report!

narcolepticinsomniac commented 6 years ago

Nice. Hadn't given it much thought, but I started wondering why the "9". Oh, probably because it isn't one. It's one of those map icons, but with a weird curve at the bottom. I've only ever seen them symmetrical, like:

image

Either way, mystery solved and bug fixed, thanks.