#269 Google fonts issue

Closed
opened 2 months ago by planeted · 6 comments

When the webiste thehindu.com is opened, I see a stylesheet request to fonts.googleapis.com that is blocked by LocalCDN. Well and good, since the Block Google Fonts option is enabled on the extension.

But 4 connections were also made to fonts.gstatic.com as you can see, which shouldn't have gone through, if I understood the functioning of the extension correctly. If there's something to fix, please do.

Else, please close this issue.

Thanks.

When the webiste `thehindu.com` is opened, I see a stylesheet request to `fonts.googleapis.com` that is blocked by LocalCDN. Well and good, since the *Block Google Fonts* option is enabled on the extension. But 4 connections were also made to `fonts.gstatic.com` as you can see, which shouldn't have gone through, if I understood the functioning of the extension correctly. If there's something to fix, please do. Else, please close this issue. Thanks.
155 KiB
nobody referenced this issue from a commit 2 months ago
nobody commented 2 months ago
Owner

Good question. The option to block Google Fonts exists only for Material Icons (https://fonts.googleapis.com/css?family=Material+Icons).

LocalCDN only listens to defined domains (the CDNs there) and the domain fonts.gstatic.com wasn't there.

I have changed this and added the domain as a CDN. Now the switch allows or disallows all Google Fonts.

Good question. The option to block Google Fonts exists only for Material Icons (`https://fonts.googleapis.com/css?family=Material+Icons`). LocalCDN only listens to defined domains (the CDNs [there](https://codeberg.org/nobody/LocalCDN/src/branch/main/core/mappings.js#L37)) and the domain `fonts.gstatic.com` wasn't there. I have changed this and added the domain as a CDN. Now the switch allows or disallows all Google Fonts.
nobody added the
enhancement
label 2 months ago
nobody added this to the v2.6.2 milestone 2 months ago
Poster

Was this intentional? Per my knowledge, fonts.gstatic.com is more extensively used and more popular than the fonts.googleapis.com.

btw, the rule sets for adblockers shows Last update: 2020-12-30. Is it accurate?

Was this intentional? Per my knowledge, `fonts.gstatic.com` is more extensively used and more popular than the `fonts.googleapis.com`. btw, the rule sets for adblockers shows `Last update: 2020-12-30`. Is it accurate?
nobody commented 2 months ago
Owner

Was this intentional? Per my knowledge, fonts.gstatic.com is more extensively used and more popular than the fonts.googleapis.com.

Yes that was/is intentional because the docs only refer to <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">. In this CSS file you see fonts.gstatic.com, but I've modified the CSS file and redirected it to the internal addon storage, see here.

btw, the rule sets for adblockers shows Last update: 2020-12-30. Is it accurate?

Yes, for the main branch this is up-to-date. In the develop branch I have changed it to today (here). The date is only important for the main domains. The sub-directories don't affect the date (and the adblocker rules).

> Was this intentional? Per my knowledge, `fonts.gstatic.com` is more extensively used and more popular than the `fonts.googleapis.com`. Yes that was/is intentional because [the docs](https://google.github.io/material-design-icons/#icon-font-for-the-web) only refer to `<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">`. In this CSS file you see `fonts.gstatic.com`, but I've modified the CSS file and redirected it to the internal addon storage, see [here](https://codeberg.org/nobody/LocalCDN/src/branch/main/resources/google-material-design-icons/google-material-design-icons.css#L6-L7). > btw, the rule sets for adblockers shows `Last update: 2020-12-30`. Is it accurate? Yes, for the main branch this is up-to-date. In the develop branch I have changed it to today ([here](https://codeberg.org/nobody/LocalCDN/src/branch/develop/core/mappings.js#L32)). The date is only important for the main domains. The sub-directories don't affect the date (and the adblocker rules).
Poster

Even though I haven't understood half of it 😄 , everything looks updated now. Thanks.

Even though I haven't understood half of it 😄 , everything looks updated now. Thanks.
nobody commented 2 months ago
Owner

Don't worry. Feel free to ask if you want me to explain anything. 😉

Don't worry. Feel free to ask if you want me to explain anything. :wink:
nobody commented 2 months ago
Owner

If you have more questions about this issue, you can reopen it or create a new issue for another topic.

If you have more questions about this issue, you can reopen it or create a new issue for another topic.
nobody closed this issue 2 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.