Referring to issue#2140, I want to request an ability to detect whether we are running the userscript in Private mode.
Use case: I have a few userscript based scheduled Tasks I do which run daily, hourly and some more frequently in the browser (e.g. Search Google for a query every n hours), but the problem is, the current task action depends on the last set GM values. Also, I run all new/non-trustworthy websites in Private mode. Now, when I'm doing this (browsing in private mode) my scheduled pages open up, and since they don't remember the values which were set up in the 'Regular (non-private) mode, try to do the same operation again and again and mess everything up. If only I could detect I'm running in Private mode, I wouldn't run those operations.
In fact, if it raises any security concerns in your opinion, for my purpose I'll be glad to even have a Script level option like 'Don't run in Private Mode' (e.g. Chrome doesn't allow running any extensions in 'Incognito mode' by default, you have to explicitly allow that)
Any comments on this issue? This is a badly missing feature from GM, and is a major pain point for some of my scripts :(.
You can use this temporary solution:
See also: https://bugzilla.mozilla.org/show_bug.cgi?id=781982
@janekptacijarabaci : Thanks! For now, I'm exploiting this Firefox bug you pointed out where Index DB doesn't work in it, and my little test works! I will still wait for a cleaner fix from GreaseMonkey.
I'm a bit confused by this because for me, data stored with GM_setValue is remembered even when in private browsing mode, and I was looking for a way to test whether it was on to avoid inappropriately recording data.
Remove `isPrivate` from Script object.
Scripts are never private or not, windows are.
This should be fixed in build 3.8beta3; confirmation would be helpful.
Awesome! Just tried, it works (in 3.8beta3)! Thanks to everyone involved in implementing it.