1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-22 05:25:46 +01:00

Add Option.has(). Improve JS completion.

This commit is contained in:
Kris Maglione
2008-10-07 03:19:40 +00:00
parent 0f438cb499
commit 3169a93825
6 changed files with 42 additions and 44 deletions

View File

@@ -308,6 +308,7 @@ liberator.Completion = function () //{{{
{
try
{
liberator.dump("eval(" + liberator.util.escapeString(arg) + ")");
return window.eval(arg);
}
catch(e) {}
@@ -345,7 +346,7 @@ liberator.Completion = function () //{{{
if (["string", "number", "boolean"].indexOf(type) > -1)
type += ": " + String(v).replace("\n", "\\n", "g");
if (type == "function")
type += ": " + v.toSource.replace(/\{.*/, "{ ... }");
type += ": " + String(v).replace(/{(.|\n)*/, "{ ... }");
compl.push([k, type]);
}