mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-25 19:52:27 +01:00
Whitespace and semicolon fixes.
This commit is contained in:
15
common/content/browser.js
Normal file → Executable file
15
common/content/browser.js
Normal file → Executable file
@@ -71,7 +71,7 @@ function Browser() //{{{
|
||||
// Stolen from browser.jar/content/browser/browser.js, more or less.
|
||||
try
|
||||
{
|
||||
var docCharset = getBrowser().docShell.QueryInterface(Ci.nsIDocCharset).charset = val
|
||||
var docCharset = getBrowser().docShell.QueryInterface(Ci.nsIDocCharset).charset = val;
|
||||
PlacesUtils.history.setCharsetForURI(getWebNavigation().currentURI, val);
|
||||
getWebNavigation().reload(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
|
||||
}
|
||||
@@ -95,19 +95,24 @@ function Browser() //{{{
|
||||
let services = modules.services; // Storage objects are global to all windows, 'modules' isn't.
|
||||
storage.newObject("private-mode", function () {
|
||||
({
|
||||
init: function () {
|
||||
init: function ()
|
||||
{
|
||||
services.get("observer").addObserver(this, "private-browsing", false);
|
||||
services.get("observer").addObserver(this, "quit-application", false);
|
||||
this.private = services.get("privateBrowsing").privateBrowsingEnabled;
|
||||
},
|
||||
observe: function (subject, topic, data) {
|
||||
if (topic == "private-browsing") {
|
||||
observe: function (subject, topic, data)
|
||||
{
|
||||
if (topic == "private-browsing")
|
||||
{
|
||||
if (data == "enter")
|
||||
storage.privateMode = true;
|
||||
else if (data == "exit")
|
||||
storage.privateMode = false;
|
||||
storage.fireEvent("private-mode", "change", storage.privateMode);
|
||||
} else if (topic == "quit-application") {
|
||||
}
|
||||
else if (topic == "quit-application")
|
||||
{
|
||||
services.get("observer").removeObserver(this, "quit-application");
|
||||
services.get("observer").removeObserver(this, "private-browsing");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user