Add user option for disabling notifications when using private browsing#1161
Add user option for disabling notifications when using private browsing#1161zilldevel wants to merge 1 commit into
Conversation
…e translations) to allow disabling notification spam when in private browsing
|
Will you ever release this extension for other browsers? |
I am not the author of STG and this appears to be completely off-topic / unrelated to my changes. So I'm a bit confused why you are commenting here. Unless you are stating that the addon currently works in other browsers and you have built and tested my change (which has not even been accepted yet), then I think you likely commented in the entirely wrong place. This should be a new "issue" (asking a question is often done as a new issue in other projects) rather than as a completely off-topic comment in a pull request. As I said, I am not the author of STG so I don't know for certain but it could be that there are differences in the tabs api between firefox and chromium preventing a straight-up port. I haven't studied the firefox and chromium tab api docs in enough depth to make any guesses. I can confirm that STG works in other Firefox-based browsers like LibreWolf. |
|
Closing in favor of PR 1173 - |
Summary
Small change to allow users to turn off the notification about private browsing, as it can be annoying when one is working in private browsing mode.
Problem:
Currently, it is very annoying to have STG installed (for normal browsing) and then open Firefox/Librewolf in a private browsing session due to the error notification that is displayed every time the user opens a new window. Certain addons that open dialog windows, such as DownThemAll, also trigger STG's error notification (when used in private browsing mode). So depending on what addons the user has, what they are doing, and how frequently they open new private browsing windows, the user could potentially be seeing this notification MUCH more frequently than simply once per day.
Notification Text:
Screenshots:
Target Notification:
What this change adds:
Code Description:
As the current version of STG does not even allow using the addon in private browsing anyway, it is debatable whether it even makes sense to have this error notification displayed at all. But that is not a decision for me to make and is outside the scope of this PR.
Instead, this PR aims simply to give the user a way to disable that specific error notification by providing a checkbox on the STG options page. The default is unchecked (false) which has the same behavior as STG currently has, simply incase the error is desired / to help users initially realize that STG doesn't work in private session.
If user checks the checkbox (true), then the notification no longer appears. Internally, the addon still throws an exception and handles everything else the same, only the notification is skipped.
Only the logic for the notification mentioned above is modified (other notifications are unaffected, only the handling for this specific one is different).
Since I only know English, the other locale messages are google translations. See the new
"disableWindowNotFoundNotifications"string underaddon/src/_locales/*/messages.jsonfiles.Builds / testing
I am on Fedora Linux and built the project using the following:
After an initial test build on the master branch to confirm there were no issues with the build on my setup, I switched to my change branch and rebuilt.
I have not looked into the signing process yet and Firefox 124.0.1 would not allow me to install due to the build being unsigned. However, in LibreWolf 124.0.1 (a popular firefox fork), I was able to set
xpinstall.signatures.required=falseand install there. After install, I confirmed that the notification is still present in private browsing (e.g. current behavior) by default / while the checkbox is unchecked, then, after checking the option, that the notification is no longer displayed.