diff --git a/vimperator/AUTHORS b/vimperator/AUTHORS index 754dc698..df9f9bc1 100644 --- a/vimperator/AUTHORS +++ b/vimperator/AUTHORS @@ -40,3 +40,4 @@ Patches (in no special order): * Dan Boger (:set online support) * Štěpán Němec (help copy-editing and favicon support) * Jarkko Oranen ('maxitems' option) + * Gary Katsevman ('private' option) diff --git a/vimperator/NEWS b/vimperator/NEWS index 6061826e..8305922d 100644 --- a/vimperator/NEWS +++ b/vimperator/NEWS @@ -13,6 +13,9 @@ { arg: true, count: true, motion: true, route: true }); * IMPORTANT: shifted key notation now matches Vim's behaviour. E.g. and are equivalent, to map the uppercase character use . - Is this still true, or going to be true? --djk + * add 'private' - enter private browsing mode IMPORTANT: this doesn't + currently cause Vimperator-specific data like command-line history to be + purged. * add -description option to :command * command-line options are now supported via the host application's -liberator option diff --git a/vimperator/content/config.js b/vimperator/content/config.js index 18d3ab8d..aad75539 100644 --- a/vimperator/content/config.js +++ b/vimperator/content/config.js @@ -477,6 +477,25 @@ const config = { //{{{ getter: function () !services.get("io").offline }); + // only available in FF 3.5 + if (Ci.nsIPrivateBrowsingService) + { + services.add("privateBrowsing", "@mozilla.org/privatebrowsing;1", Ci.nsIPrivateBrowsingService); + options.add(["private", "pornmode"], + "Set the 'private browsing' option", + "boolean", false, + { + setter: function (value) + { + return services.get("privateBrowsing").privateBrowsingEnabled = value; + }, + getter: function () + { + return services.get("privateBrowsing").privateBrowsingEnabled; + } + }); + } + // TODO: merge with Vimperator version and add Muttator version // (TB handles this differently). options.add(["titlestring"], diff --git a/vimperator/locale/en-US/index.txt b/vimperator/locale/en-US/index.txt index f81dc37f..e788b1f0 100644 --- a/vimperator/locale/en-US/index.txt +++ b/vimperator/locale/en-US/index.txt @@ -304,6 +304,7 @@ section:Options[option-index] ||'pageinfo'|| Desired info on [c]:pa[geinfo][c] + ||'popups'|| Where to show requested popup windows + ||'previouspattern'|| Patterns to use when guessing the \'previous' page in a document sequence + +||'private'|| Set the 'private browsing' option + ||'runtimepath'|| List of directories searched for runtime files + ||'scroll'|| Number of lines to scroll with [m][m] and [m][m] commands + ||'shell'|| Shell to use for executing [c]:![c] and [c]:run[c] commands + diff --git a/vimperator/locale/en-US/options.txt b/vimperator/locale/en-US/options.txt index d695d123..3f9aabd9 100644 --- a/vimperator/locale/en-US/options.txt +++ b/vimperator/locale/en-US/options.txt @@ -445,6 +445,21 @@ Number of Ex commands and search patterns to store in the command-line history. ____ +|\'noprivate'| |\'private'| +||'private'|| boolean (default: off) +____ +Set the 'private browsing' option. In private browsing mode history, cache +files, cookies, form data, passwords, and download list entries are available +only for the duration of the private browsing session and deleted when +returning to normal browsing mode. + +Warning: Vimperator specific data like command-line history is not yet purged +when exiting private browsing mode. + +Note: this is only available in FF 3.5. +____ + + |\'nohls'| |\'nohlsearch'| |\'hls'| |\'hlsearch'| ||'hlsearch' 'hls'|| boolean (default: off) ____