1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 09:17:59 +01:00

Fix favcons in completions, add "shutdown" trigger, register vimperator.css as user stylesheet, make option completions better, hide completion list when no completions available. Yeah. A lot. Sorry.

This commit is contained in:
Kris Maglione
2008-10-05 03:50:09 +00:00
parent 506838b41d
commit 55df63ee81
13 changed files with 157 additions and 170 deletions

View File

@@ -77,22 +77,10 @@ liberator.util = { //{{{
yield ary[i];
},
blankDocument: function (bodyId)
blankDocument: function (iframe, bodyId)
{
let mainWindowID = liberator.config.mainWindowID || "main-window";
let fontSize = document.defaultView.getComputedStyle(document.getElementById(mainWindowID), null)
.getPropertyValue("font-size");
return 'data:application/xhtml+xml,' + encodeURI('<?xml version="1.0" encoding="UTF-8"?>' +
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">' +
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title/>
<link rel="stylesheet" type="text/css"
href={"chrome://" + liberator.config.name.toLowerCase() + "/skin/vimperator.css"}/>
</head>
<body id={bodyId} style={"font-size: " + fontSize}/>
</html>)
iframe.addEventListener("load", function () { iframe.contentDocument.body.setAttribute("id", bodyId) }, true);
iframe.setAttribute("src", "chrome://" + liberator.config.name.toLowerCase() + "/content/buffer.xhtml");
},
clip: function (str, length)
@@ -444,6 +432,7 @@ liberator.util = { //{{{
xmlToDom: function (node, doc)
{
XML.prettyPrinting = false;
switch (node.nodeKind())
{
case "text":