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

Bunch-o-fixes, plus some non-trivial changes that I may wind up weeding out.

This commit is contained in:
Kris Maglione
2008-10-04 04:08:03 +00:00
parent 3ceecbaf52
commit 1891746b9e
15 changed files with 144 additions and 93 deletions

View File

@@ -77,22 +77,11 @@ 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>)
let name = liberator.config.name.toLowerCase();
iframe.addEventListener("load", function () iframe.contentDocument.body.setAttribute("id", bodyId), true);
iframe.setAttribute("src", "chrome://" + name + "/skin/blank-" + name + ".xhtml");
},
clip: function (str, length)