Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added option for user to completely disable all notifications #1173

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zilldevel
Copy link

@zilldevel zilldevel commented May 29, 2024

Problem Summary

Currently, while STG does not work in private browsing mode, if the addon is simply installed and active, it will still generate notification messages. Those message are displayed not only at browser launch but also every time any other addons (e.g. like DownThemAll) open their own windows. I quickly grew to find this behavior annoying.

Originally, I had made a patch/PR here to simply turn off that 1 notification. But after further testing, I found I would still get other notifications whenever I used a private browsing session.

Change Summary

This is a small change that simply gives the user a checkbox where they can disable all notifications. The checkbox is NOT enabled/checked by default (e.g. STG will behave as it always has unless the user specifically checks the box). But doing so makes the occasional private browsing session much more enjoyable. Aside from private browsing, this can also serve as an override that allows users to turn off all notifications from a central location instead of having to select multiple values.

Mostly this is applied in addon/src/js/utils.js by adding an import + a check in the notify function. If the boolean is set, the function will always pass the check and returns without generating any notification messages.

Notification Text:

Error: Error: not found any normal not private/incognito/popup windows.

Addon stopped working. Please, restart browser.

Screenshots:

example of notifications seen during private browsing :

stg-private-browsing-notification

What this change adds:

new-stg-option

Builds / testing

I am on Fedora Linux and built the project using the following:

$ cd addons
$ npm install && npm run build && npm run build-zip

I have tested my build in LibreWolf (using xpinstall.signatures.required=false) with no issues. By that, I mean that I confirmed the existing behavior in both the original addon and then again in my build, then checked the new option and confirmed that I was no longer getting notification messages.

@zilldevel
Copy link
Author

I was finally able to get time to figure out the AMO signing process and now have a signed build here. I have been able to test this successfully in Firefox 126 on Fedora.

Note: this build has logo/branding changes because when I was reading the license, my understanding was that any forks are supposed to change name/branding/logo... if I misunderstood and spent time doing that needlessly, then apologies for any confusion. Anyway, just wanted to clarify in advance that the logo/branding changes are ONLY in my master branch / linked test xpi and are NOT present in this Pull Request.

@zilldevel
Copy link
Author

Looking through some of the tickets, in theory this could also potentially resolve or at least add a workaround for the following issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant