mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 16:42:26 +01:00
Fix :pageinfo layout
This commit is contained in:
@@ -63,6 +63,8 @@ liberator.Buffer = function () //{{{
|
|||||||
.getService(Components.interfaces.nsIIOService);
|
.getService(Components.interfaces.nsIIOService);
|
||||||
const sss = Components.classes["@mozilla.org/content/style-sheet-service;1"]
|
const sss = Components.classes["@mozilla.org/content/style-sheet-service;1"]
|
||||||
.getService(Components.interfaces.nsIStyleSheetService);
|
.getService(Components.interfaces.nsIStyleSheetService);
|
||||||
|
const namespace = "@namespace url(" + XHTML + ");\n" +
|
||||||
|
"@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);\n";
|
||||||
|
|
||||||
let cssUri = function (css) "data:text/css," + encodeURI(css);
|
let cssUri = function (css) "data:text/css," + encodeURI(css);
|
||||||
|
|
||||||
@@ -76,7 +78,7 @@ liberator.Buffer = function () //{{{
|
|||||||
this.__defineGetter__("chromeCSS", function ()
|
this.__defineGetter__("chromeCSS", function ()
|
||||||
{
|
{
|
||||||
let css = [v[1] for ([k, v] in this) if (v[0].indexOf("chrome") >= 0)];
|
let css = [v[1] for ([k, v] in this) if (v[0].indexOf("chrome") >= 0)];
|
||||||
return cssUri(css.join("\n/**/\n"));
|
return cssUri(namespace + css.join("\n/**/\n"));
|
||||||
});
|
});
|
||||||
|
|
||||||
this.addSheet = function (filter, css, system)
|
this.addSheet = function (filter, css, system)
|
||||||
@@ -160,14 +162,13 @@ liberator.Buffer = function () //{{{
|
|||||||
function wrapCSS(filter, css)
|
function wrapCSS(filter, css)
|
||||||
{
|
{
|
||||||
if (filter[0] == "*")
|
if (filter[0] == "*")
|
||||||
return "@namespace url(" + XHTML + ");\n" + css;
|
return namespace + css;
|
||||||
let selectors = filter.map(function (part) (/[*]$/.test(part) ? "url-prefix" :
|
let selectors = filter.map(function (part) (/[*]$/.test(part) ? "url-prefix" :
|
||||||
/[\/:]/.test(part) ? "url"
|
/[\/:]/.test(part) ? "url"
|
||||||
: "domain")
|
: "domain")
|
||||||
+ '("' + part.replace(/"/g, "%22").replace(/[*]$/, "") + '")')
|
+ '("' + part.replace(/"/g, "%22").replace(/[*]$/, "") + '")')
|
||||||
.join(", ");
|
.join(", ");
|
||||||
return "@namespace url(" + XHTML + ");\n" +
|
return namespace + "@-moz-document " + selectors + "{\n" + css + "\n}\n";
|
||||||
"@-moz-document " + selectors + "{\n" + css + "\n}\n";
|
|
||||||
/* } vim */
|
/* } vim */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,7 +198,7 @@ liberator.Buffer = function () //{{{
|
|||||||
if (testDoc.documentElement.firstChild)
|
if (testDoc.documentElement.firstChild)
|
||||||
testDoc.documentElement.removeChild(testDoc.documentElement.firstChild);
|
testDoc.documentElement.removeChild(testDoc.documentElement.firstChild);
|
||||||
testDoc.documentElement.appendChild(util.xmlToDom(
|
testDoc.documentElement.appendChild(util.xmlToDom(
|
||||||
<html><head><link type="text/css" rel="stylesheet" href={cssUri(css)}/></head></html>, testDoc));
|
<html><head><link type="text/css" rel="stylesheet" href={cssUri(namespace + css)}/></head></html>, testDoc));
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
@@ -1012,10 +1013,8 @@ liberator.Buffer = function () //{{{
|
|||||||
// get meta tag data, sort and put into pageMeta[]
|
// get meta tag data, sort and put into pageMeta[]
|
||||||
var metaNodes = window.content.document.getElementsByTagName("meta");
|
var metaNodes = window.content.document.getElementsByTagName("meta");
|
||||||
|
|
||||||
let nodes = Array.map(metaNodes, function (node) [(node.name || node.httpEquiv), node.content])
|
return Array.map(metaNodes, function (node) [(node.name || node.httpEquiv), liberator.util.highlightURL(node.content)])
|
||||||
.sort(function (a, b) String.localeCompare(a[0].toLowerCase(), b[0].toLowerCase()));
|
.sort(function (a, b) String.localeCompare(a[0].toLowerCase(), b[0].toLowerCase()));
|
||||||
return ([node[0], liberator.util.highlightURL(node[1], false)]
|
|
||||||
for each (node in arrayIter(nodes)));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////}}}
|
/////////////////////////////////////////////////////////////////////////////}}}
|
||||||
@@ -2102,7 +2101,7 @@ liberator.template = {
|
|||||||
{
|
{
|
||||||
let table =
|
let table =
|
||||||
<table>
|
<table>
|
||||||
<tr class="hl-Title">
|
<tr class="hl-Title" align="left">
|
||||||
<th colspan="2">{title}</th>
|
<th colspan="2">{title}</th>
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user