1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-05 02:44:13 +01:00

new 'online' option, thanks zigdon!

This commit is contained in:
Martin Stubenschrott
2008-06-06 23:24:41 +00:00
parent f735f772e4
commit 62df5aa6fe
5 changed files with 32 additions and 1 deletions

View File

@@ -327,6 +327,29 @@ liberator.config = { //{{{
{
completer: function (filter) { return liberator.completion.url(filter); }
});
/////////////////////////////////////////////////////////////////////////////}}}
////////////////////// OPTIONS /////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////{{{
liberator.options.add(["online"], "Set and reset the 'work offline' option", "boolean", true,
{
setter: function (value)
{
var ioService = Components.classes['@mozilla.org/network/io-service;1'].
getService(Components.interfaces.nsIIOService2);
ioService.offline = !value;
gPrefService.setBoolPref("browser.offline", ioService.offline);
},
getter: function ()
{
return Components.classes['@mozilla.org/network/io-service;1'].
getService(Components.interfaces.nsIIOService2).offline;
}
});
}
//}}}
}; //}}}