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

More completion stuff

This commit is contained in:
Kris Maglione
2008-11-24 21:40:02 +00:00
parent ccdf6f1011
commit 9398ffed1c
5 changed files with 59 additions and 42 deletions

View File

@@ -130,13 +130,21 @@ const util = { //{{{
};
},
compareIgnoreCase: function (a, b) String.localeCompare(a.toLowerCase(), b.toLowerCase()),
cloneObject: function (obj)
{
let newObj = {};
for (let [k, v] in Iterator(obj))
newObj[k] = v;
return newObj;
},
clip: function (str, length)
{
return str.length <= length ? str : str.substr(0, length - 3) + "...";
},
compareIgnoreCase: function (a, b) String.localeCompare(a.toLowerCase(), b.toLowerCase()),
computedStyle: function (node)
{
while (node instanceof Text && node.parentNode)