by halfstep · 3y ago · 0 comments
If a website asks if I have notifications enabled, tell them yes, and send them all into the oblivion.
Edit: to clarify, I already disable all notifications in Firefox. I was referring to websites that check via JavaScript whether you have notifications turned on and trigger a pop up to ask you to enable them.
Here's also a userscript that removes the service worker API from Chromium browsers:
// ==UserScript==
// @name Remove service worker API
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*/*
// @grant none
// @run-at document-start
// ==/UserScript==
delete Object.getPrototypeOf(navigator).serviceWorker;
In Firefox, iirc you can disable that API somewhere in about:config.I don't enable notifications and it's fine, I've never had a problem.
If you don't want notifications, why would you still want the website to send them?
So ideally this would stop that from happening.
But sites that do it are hostile and should just be blocked. What other shenanigans are they pulling?
On Safari you can even disable the option for websites to request notification access. It’s on the Websites tab in Settings.