Correct typo in font URL which caused delays in opening the extension under certain circumstances #61
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a minor change that should, hopefully, fix an annoying to track down bug, #48.
The index.html file attempts to call "googleapi.com". The correct URL is "googleapis.com". The extension appears to fallback to a different font upon the failure, however on some VPNs, the incorrect URL will get stuck loading for ~10-20 seconds before falling back.
In the future, some additional error handling logic could be implemented to time the font request out after a few seconds. Theoretically, the extension would get stuck opening indefinitely if the font domain is ever unreachable but does not return an outright failure, although the browser would probably forcefully time it out after a little while. The font could also be bundled or cached locally so that it doesn't need to be fetched locally.
Testing
I have been able to consistently reproduce #48 by using Windscribe VPN and Firefox on Windows 11. It is difficult to reproduce, as it seems to be caused by an old cached ip for that googleapi.com domain. Either way, this probably doesn't require extensive tests, as the typo domain is a (minor) issue either way. I did confirm that this resolves #48 for me by cloning the repo locally, changing the domain, and loading the extension in Firefox.
Note
I didn't use any linter or IDE to make this change. I just used GitHub's built in code editor in the web GUI. I know last time this caused an issue with the linter, apologies if that happens again.