mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-17 06:14:12 +01:00
Cc/Ci/Cr/Cu
This commit is contained in:
@@ -40,12 +40,9 @@ function Bookmarks() //{{{
|
||||
const historyService = PlacesUtils.history;
|
||||
const bookmarksService = PlacesUtils.bookmarks;
|
||||
const taggingService = PlacesUtils.tagging;
|
||||
const searchService = Components.classes["@mozilla.org/browser/search-service;1"]
|
||||
.getService(Components.interfaces.nsIBrowserSearchService);
|
||||
const ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
const faviconService = Components.classes["@mozilla.org/browser/favicon-service;1"]
|
||||
.getService(Components.interfaces.nsIFaviconService);
|
||||
const searchService = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
|
||||
const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
|
||||
const faviconService = Cc["@mozilla.org/browser/favicon-service;1"].getService(Ci.nsIFaviconService);
|
||||
|
||||
const Bookmark = new Struct("url", "title", "icon", "keyword", "tags", "id");
|
||||
const Keyword = new Struct("keyword", "title", "icon", "url");
|
||||
@@ -183,9 +180,9 @@ function Bookmarks() //{{{
|
||||
},
|
||||
QueryInterface: function QueryInterface(iid)
|
||||
{
|
||||
if (iid.equals(Components.interfaces.nsINavBookmarkObserver) || iid.equals(Components.interfaces.nsISupports))
|
||||
if (iid.equals(Ci.nsINavBookmarkObserver) || iid.equals(Ci.nsISupports))
|
||||
return this;
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
throw Cr.NS_ERROR_NO_INTERFACE;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -536,8 +533,7 @@ function Bookmarks() //{{{
|
||||
|
||||
getSuggestions: function getSuggestions(engine, query, callback)
|
||||
{
|
||||
let ss = Components.classes["@mozilla.org/browser/search-service;1"]
|
||||
.getService(Components.interfaces.nsIBrowserSearchService);
|
||||
let ss = Cc["@mozilla.org/browser/search-service;1"].getService(Ci.nsIBrowserSearchService);
|
||||
const responseType = "application/x-suggestions+json";
|
||||
|
||||
let engine = ss.getEngineByAlias(engine);
|
||||
@@ -548,8 +544,7 @@ function Bookmarks() //{{{
|
||||
|
||||
function process(resp)
|
||||
{
|
||||
const json = Components.classes["@mozilla.org/dom/json;1"]
|
||||
.createInstance(Components.interfaces.nsIJSON);
|
||||
const json = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
|
||||
let results = [];
|
||||
try
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ const config = { //{{{
|
||||
["checkupdates", "Check for updates",
|
||||
function () { window.checkForUpdates(); }],
|
||||
["cleardata", "Clear private data",
|
||||
function () { Components.classes[GLUE_CID].getService(Components.interfaces.nsIBrowserGlue).sanitize(window || null); }],
|
||||
function () { Cc[GLUE_CID].getService(Ci.nsIBrowserGlue).sanitize(window || null); }],
|
||||
["cookies", "List your cookies",
|
||||
function () { window.toOpenWindowByType("Browser:Cookies", "chrome://browser/content/preferences/cookies.xul", "chrome,dialog=no,resizable"); }],
|
||||
["console", "JavaScript console",
|
||||
@@ -338,8 +338,8 @@ const config = { //{{{
|
||||
"Redraw the screen",
|
||||
function ()
|
||||
{
|
||||
let wu = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor).
|
||||
getInterface(Components.interfaces.nsIDOMWindowUtils);
|
||||
let wu = window.QueryInterface(Ci.nsIInterfaceRequestor).
|
||||
getInterface(Ci.nsIDOMWindowUtils);
|
||||
wu.redraw();
|
||||
modes.show();
|
||||
},
|
||||
@@ -418,8 +418,7 @@ const config = { //{{{
|
||||
{
|
||||
setter: function (value)
|
||||
{
|
||||
const ioService = Components.classes['@mozilla.org/network/io-service;1']
|
||||
.getService(Components.interfaces.nsIIOService2);
|
||||
const ioService = Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService2);
|
||||
|
||||
ioService.offline = !value;
|
||||
gPrefService.setBoolPref("browser.offline", ioService.offline);
|
||||
@@ -428,8 +427,7 @@ const config = { //{{{
|
||||
},
|
||||
getter: function ()
|
||||
{
|
||||
return Components.classes['@mozilla.org/network/io-service;1']
|
||||
.getService(Components.interfaces.nsIIOService2).offline;
|
||||
return Cc['@mozilla.org/network/io-service;1'].getService(Ci.nsIIOService2).offline;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user