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

Do away with services.(get|create), and move the prefs module to its own file.

This commit is contained in:
Kris Maglione
2010-12-01 21:57:51 -05:00
parent 0bf9cfb0bc
commit 5d51fd491a
26 changed files with 540 additions and 516 deletions

View File

@@ -11,7 +11,7 @@ defineModule("styles", {
use: ["template"]
});
const sss = services.get("stylesheet");
const sss = services.stylesheet;
function cssUri(css) "chrome-data:text/css," + encodeURI(css);
const namespace = "@namespace html " + XHTML.uri.quote() + ";\n" +
"@namespace xul " + XUL.uri.quote() + ";\n" +
@@ -219,7 +219,7 @@ const Styles = Module("Styles", {
* already registered.
*/
registerSheet: function registerSheet(url, agent, reload) {
let uri = services.get("io").newURI(url, null, null);
let uri = services.io.newURI(url, null, null);
if (reload)
this.unregisterSheet(url, agent);
if (reload || !sss.sheetRegistered(uri, agent ? sss.AGENT_SHEET : sss.USER_SHEET))
@@ -233,7 +233,7 @@ const Styles = Module("Styles", {
* @param {boolean} agent If true, sheet is registered as an agent sheet.
*/
unregisterSheet: function unregisterSheet(url, agent) {
let uri = services.get("io").newURI(url, null, null);
let uri = services.io.newURI(url, null, null);
if (sss.sheetRegistered(uri, agent ? sss.AGENT_SHEET : sss.USER_SHEET))
sss.unregisterSheet(uri, agent ? sss.AGENT_SHEET : sss.USER_SHEET);
},