Azure / awesome-azd

An awesome list that curates content (articles, videos, tutorials and docs) and templates (ready to use) for the Azure Developer CLI (`azd`). Plus a hosted azd-templates Gallery to simplify search & discovery
https://aka.ms/awesome-azd
MIT License
140 stars 69 forks source link

Site crashes with oneDS error when using an ad blocker #367

Closed aheld closed 1 month ago

aheld commented 2 months ago

Describe the bug The generated website fails to load and render https://aka.ms/awesome-azd

To Reproduce go to https://aka.ms/awesome-azd using a browser with an ad blocker

Expected behavior the site should load and let me search for templates so that I can promote AZD for a new project.

Alternatively it can ask me to disable my ad blocker.

Screenshots

image

Additional context When an ad blocker is used, the 1DS tracking library can't load, and causes a javascript error

main.f5148fcd.js:2 ReferenceError: oneDS is not defined due to https://github.com/Azure/awesome-azd/blob/main/website/src/theme/Navbar/Layout/index.js#L109

note I'm opening a ticket mainly because I checked out the code to try to fix the javascript error before I realized I caused the error. It may help to have an issue logged for the next person to discover.

hemarina commented 2 months ago

@aheld May I ask which ad blocker are you using?

aheld commented 2 months ago

@hemarina Privacy Badger (privacybadger.org). On both Edge and Chrome on OSX.

It reports as follows:

Privacy Badger (privacybadger.org) is a browser extension that automatically learns to block invisible trackers. Privacy Badger is made by the Electronic Frontier Foundation, a nonprofit that fights for your rights online.

Privacy Badger blocked 2 potential trackers on azure.github.io:

js.monitor.azure.com wcpstatic.microsoft.com

aheld commented 1 month ago

Thank you!

hemarina commented 1 month ago

Thanks @aheld for filling this issue. This change will be synced on regular release (tomorrow).