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

Death to E4X and stuff.

This commit is contained in:
Kris Maglione
2012-11-30 20:46:38 -08:00
parent dff13c70fc
commit da3785028d
6 changed files with 138 additions and 30 deletions

View File

@@ -50,8 +50,12 @@ function NetError(orig, error) {
}).data.QueryInterface(Ci.nsIChannel);
}
function RedirectChannel(to, orig, time, message) {
let html = <html><head><meta http-equiv="Refresh" content={(time || 0) + ";" + to}/></head>
<body><h2 style="text-align: center">{message || ""}</h2></body></html>.toXMLString();
let html = DOM.toXML(
["html", {},
["head", {},
["meta", { "http-equiv": "Refresh", content: (time || 0) + ";" + to }]],
["body", {},
["h2", { style: "text-align: center" }, message || ""]]]);
return StringChannel(html, "text/html", services.io.newURI(to, null, null));
}