diff --git a/content/options.js b/content/options.js index 7f09f60f..5fda9478 100644 --- a/content/options.js +++ b/content/options.js @@ -289,10 +289,9 @@ liberator.Options = function () //{{{ { if (!args) { - var str = ""; - for (let i in liberator.globalVariables) + var str = <>; + for (let [i, value] in Iterator(liberator.globalVariables)) { - var value = liberator.globalVariables[i]; if (typeof value == "number") var prefix = "#"; else if (typeof value == "function") @@ -300,10 +299,10 @@ liberator.Options = function () //{{{ else var prefix = ""; - str += "" + i + "" + prefix + value + "\n"; + str += {i}{prefix}{value}; } - if (str) - liberator.echo("" + str + "
", liberator.commandline.FORCE_MULTILINE); + if (str.length()) + liberator.echo({str}
, liberator.commandline.FORCE_MULTILINE); else liberator.echo("No variables found"); return; diff --git a/content/util.js b/content/util.js index 32f33aad..2ed7f54a 100644 --- a/content/util.js +++ b/content/util.js @@ -71,17 +71,17 @@ liberator.util = { //{{{ var str = arg.toString(); if (typeof str == "string") // can be "undefined" - return liberator.util.escapeHTML(str); + return <>{str}; else return "undefined"; } } catch (e) { - return "<unknown>"; + return <>]]>; } - return "<unknown type>"; + return <>]]>; }, copyToClipboard: function (str, verbose)