1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 07:27:58 +01:00

Properly kludge last commit.

This commit is contained in:
Kris Maglione
2008-10-31 16:22:01 +00:00
parent f7141d55e1
commit d7c5e79cd7
2 changed files with 17 additions and 7 deletions

View File

@@ -137,6 +137,14 @@ const util = { //{{{
return str.length <= length ? str : str.substr(0, length - 3) + "...";
},
computedStyle: function (node)
{
while (node instanceof Text && node.parentNode)
node = node.parentNode;
let style = node.ownerDocument.defaultView.getComputedStyle(node, null);
return util.Array.assocToObj(Array.map(style, function (k) [k, style.getPropertyValue(k)]));
},
copyToClipboard: function (str, verbose)
{
var clipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]