javascript - Greasemonkey detect private browsing mode? -
I need to behave differently in my grayskami script if it is currently running in Firefox's Private Browsing Window. Is it possible to detect Greasemonkey? If not, is it possible to not run at all in the private browsing mode?
EDIT: One reason I want to do this is that the script normally requests AJAX, which includes information about the page and the server-side can store that information (in normal mode Is fine while browsing). If the user is in private browsing, however, I do not want server-side information that the user is going to the page, so I want him not to make this request in those cases.
there is no guarantee that will help you because I'm not sure that to use GM script If Greece monster will expose component APIs in Firefox or not The initial search is not visible to anything.
try {var pbs = Components.classes ["@ mozilla.org/privatebrowsing;1"] .getService (Components.interfaces.nsIPrivateBrowsingService); Browsing mode in private = pbs.privateBrowsingEnabled; If (private! Privacy!) Protects personal information, hold (e) {warning ("error!"); }
Comments
Post a Comment