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

Feature Request: Support for detecting private mode. #2199

Closed
piyushsoni opened this issue Jun 15, 2015 · 9 comments

Comments

Projects
None yet
4 participants
@piyushsoni
Copy link

commented Jun 15, 2015

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)

Thanks!

@piyushsoni

This comment has been minimized.

Copy link
Author

commented Sep 29, 2015

@arantius ,
Any comments on this issue? This is a badly missing feature from GM, and is a major pain point for some of my scripts :(.

Thanks!

@janekptacijarabaci

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2015

@piyushsoni

This comment has been minimized.

Copy link
Author

commented Sep 30, 2015

@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.

@ccd0

This comment has been minimized.

Copy link

commented Nov 14, 2015

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.

@janekptacijarabaci

This comment has been minimized.

Copy link
Contributor

commented Nov 14, 2015

FYI

Tampermonkey:

  • GM_info.isIncognito
  • The "Store data in incognito mode" setting. The available options are "temporary" and "permanent".
@janekptacijarabaci

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2016

  • GM_info.isIncognito/isPrivate

@arantius arantius added this to the 3.8 milestone Apr 18, 2016

arantius added a commit to arantius/greasemonkey that referenced this issue Apr 18, 2016

Remove `isPrivate` from Script object.
Scripts are never private or not, windows are.

Refs greasemonkey#2199
@arantius

This comment has been minimized.

Copy link
Collaborator

commented Apr 18, 2016

Feature merged.

@arantius arantius closed this Apr 18, 2016

@arantius

This comment has been minimized.

Copy link
Collaborator

commented Apr 18, 2016

This should be fixed in build 3.8beta3; confirmation would be helpful.

https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/3.8beta3

@piyushsoni

This comment has been minimized.

Copy link
Author

commented Apr 19, 2016

Awesome! Just tried, it works (in 3.8beta3)! Thanks to everyone involved in implementing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.