added option for user to completely disable all notifications #1173
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.
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 thenotify
function. If the boolean is set, the function will always pass the check and returns without generating any notification messages.Notification Text:
Screenshots:
example of notifications seen during private browsing :
What this change adds:
Builds / testing
I am on Fedora Linux and built the project using the following:
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.