mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 12:42:26 +01:00
Last commit done right (or wrong, as it so happens, given Spidermonkeys buggy regex engine)
This commit is contained in:
@@ -1111,7 +1111,8 @@ liberator.Buffer = function () //{{{
|
||||
let cssClass = class[1] || ".hl-" + class[0];
|
||||
let scope = class[2] || highlightDocs;
|
||||
|
||||
let getCSS = function (style) cssClass + selectors + " { " + style.replace(/(?:!\s*important\s*)?(?:;?$|;)/g, "!important;") + " }";
|
||||
let getCSS = function (style) cssClass + selectors +
|
||||
" { " + style.replace(/(?:!\s*important\s*)?(?:;?\s*$|;)/g, "!important;").replace(";!important;", ";", "g") + " }";
|
||||
let css = getCSS(style);
|
||||
|
||||
if (highlight.get(key))
|
||||
|
||||
@@ -318,7 +318,7 @@ liberator.Completion = function () //{{{
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
liberator.dump(liberator.util.escapeString(string) + ": " + e + "\n" + e.stack + "\n");
|
||||
liberator.dump(liberator.util.escapeString(string) + ": " + e + "\n" + e.stack);
|
||||
lastIdx = 0;
|
||||
return [0, []];
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ liberator.Events = function () //{{{
|
||||
// return true when load successful, or false otherwise
|
||||
function waitForPageLoaded()
|
||||
{
|
||||
liberator.dump("start waiting in loaded state: " + liberator.buffer.loaded + "\n");
|
||||
liberator.dump("start waiting in loaded state: " + liberator.buffer.loaded);
|
||||
liberator.threadyield(true); // clear queue
|
||||
|
||||
if (liberator.buffer.loaded == 1)
|
||||
@@ -548,7 +548,7 @@ liberator.Events = function () //{{{
|
||||
{
|
||||
liberator.threadyield();
|
||||
if ((now - then) % 1000 < 10)
|
||||
liberator.dump("waited: " + (now - then) + " ms\n");
|
||||
liberator.dump("waited: " + (now - then) + " ms");
|
||||
|
||||
if (!liberator.modes.isReplaying)
|
||||
return false;
|
||||
@@ -567,7 +567,7 @@ liberator.Events = function () //{{{
|
||||
var ret = (liberator.buffer.loaded == 1);
|
||||
if (!ret)
|
||||
liberator.echoerr("Page did not load completely in " + ms + " milliseconds. Macro stopped.");
|
||||
liberator.dump("done waiting: " + ret + "\n");
|
||||
liberator.dump("done waiting: " + ret);
|
||||
|
||||
// sometimes the input widget had focus when replaying a macro
|
||||
// maybe this call should be moved somewhere else?
|
||||
@@ -715,7 +715,7 @@ liberator.Events = function () //{{{
|
||||
destroy: function ()
|
||||
{
|
||||
// removeEventListeners() to avoid mem leaks
|
||||
liberator.dump("TODO: remove all eventlisteners\n");
|
||||
liberator.dump("TODO: remove all eventlisteners");
|
||||
|
||||
if (typeof getBrowser != "undefined")
|
||||
getBrowser().removeProgressListener(this.progressListener);
|
||||
@@ -1049,7 +1049,7 @@ liberator.Events = function () //{{{
|
||||
{
|
||||
if (liberator.config.isComposeWindow)
|
||||
{
|
||||
liberator.dump("Compose editor got focus\n");
|
||||
liberator.dump("Compose editor got focus");
|
||||
liberator.modes.set(liberator.modes.INSERT, liberator.modes.TEXTAREA);
|
||||
}
|
||||
else if (liberator.mode != liberator.modes.MESSAGE)
|
||||
|
||||
@@ -44,7 +44,7 @@ const liberator = (function () //{{{
|
||||
try
|
||||
{
|
||||
liberator.log(message, 0);
|
||||
liberator.dump(message + "\n");
|
||||
liberator.dump(message);
|
||||
liberator[name] = func();
|
||||
}
|
||||
catch (e)
|
||||
@@ -52,8 +52,7 @@ const liberator = (function () //{{{
|
||||
toJavaScriptConsole();
|
||||
if (Components.utils.reportError)
|
||||
Components.utils.reportError(e);
|
||||
liberator.dump(e + "\n");
|
||||
liberator.dump(e.stack + "\n");
|
||||
liberator.dump(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -661,14 +660,7 @@ const liberator = (function () //{{{
|
||||
|
||||
dumpStack: function (msg)
|
||||
{
|
||||
try
|
||||
{
|
||||
someStatisticallyImprobableVariableName.foo = 1;
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
liberator.dump((msg || "") + e.stack);
|
||||
}
|
||||
liberator.dump((msg || "") + (new Error()).stack.replace(/.*\n/, ""));
|
||||
},
|
||||
|
||||
// with (liberator) means, liberator is the default namespace "inside" eval
|
||||
|
||||
Reference in New Issue
Block a user