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 cssClass = class[1] || ".hl-" + class[0];
|
||||||
let scope = class[2] || highlightDocs;
|
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);
|
let css = getCSS(style);
|
||||||
|
|
||||||
if (highlight.get(key))
|
if (highlight.get(key))
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ liberator.Completion = function () //{{{
|
|||||||
}
|
}
|
||||||
catch (e)
|
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;
|
lastIdx = 0;
|
||||||
return [0, []];
|
return [0, []];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -536,7 +536,7 @@ liberator.Events = function () //{{{
|
|||||||
// return true when load successful, or false otherwise
|
// return true when load successful, or false otherwise
|
||||||
function waitForPageLoaded()
|
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
|
liberator.threadyield(true); // clear queue
|
||||||
|
|
||||||
if (liberator.buffer.loaded == 1)
|
if (liberator.buffer.loaded == 1)
|
||||||
@@ -548,7 +548,7 @@ liberator.Events = function () //{{{
|
|||||||
{
|
{
|
||||||
liberator.threadyield();
|
liberator.threadyield();
|
||||||
if ((now - then) % 1000 < 10)
|
if ((now - then) % 1000 < 10)
|
||||||
liberator.dump("waited: " + (now - then) + " ms\n");
|
liberator.dump("waited: " + (now - then) + " ms");
|
||||||
|
|
||||||
if (!liberator.modes.isReplaying)
|
if (!liberator.modes.isReplaying)
|
||||||
return false;
|
return false;
|
||||||
@@ -567,7 +567,7 @@ liberator.Events = function () //{{{
|
|||||||
var ret = (liberator.buffer.loaded == 1);
|
var ret = (liberator.buffer.loaded == 1);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
liberator.echoerr("Page did not load completely in " + ms + " milliseconds. Macro stopped.");
|
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
|
// sometimes the input widget had focus when replaying a macro
|
||||||
// maybe this call should be moved somewhere else?
|
// maybe this call should be moved somewhere else?
|
||||||
@@ -715,7 +715,7 @@ liberator.Events = function () //{{{
|
|||||||
destroy: function ()
|
destroy: function ()
|
||||||
{
|
{
|
||||||
// removeEventListeners() to avoid mem leaks
|
// removeEventListeners() to avoid mem leaks
|
||||||
liberator.dump("TODO: remove all eventlisteners\n");
|
liberator.dump("TODO: remove all eventlisteners");
|
||||||
|
|
||||||
if (typeof getBrowser != "undefined")
|
if (typeof getBrowser != "undefined")
|
||||||
getBrowser().removeProgressListener(this.progressListener);
|
getBrowser().removeProgressListener(this.progressListener);
|
||||||
@@ -1049,7 +1049,7 @@ liberator.Events = function () //{{{
|
|||||||
{
|
{
|
||||||
if (liberator.config.isComposeWindow)
|
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);
|
liberator.modes.set(liberator.modes.INSERT, liberator.modes.TEXTAREA);
|
||||||
}
|
}
|
||||||
else if (liberator.mode != liberator.modes.MESSAGE)
|
else if (liberator.mode != liberator.modes.MESSAGE)
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ const liberator = (function () //{{{
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
liberator.log(message, 0);
|
liberator.log(message, 0);
|
||||||
liberator.dump(message + "\n");
|
liberator.dump(message);
|
||||||
liberator[name] = func();
|
liberator[name] = func();
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
@@ -52,8 +52,7 @@ const liberator = (function () //{{{
|
|||||||
toJavaScriptConsole();
|
toJavaScriptConsole();
|
||||||
if (Components.utils.reportError)
|
if (Components.utils.reportError)
|
||||||
Components.utils.reportError(e);
|
Components.utils.reportError(e);
|
||||||
liberator.dump(e + "\n");
|
liberator.dump(e);
|
||||||
liberator.dump(e.stack + "\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -661,14 +660,7 @@ const liberator = (function () //{{{
|
|||||||
|
|
||||||
dumpStack: function (msg)
|
dumpStack: function (msg)
|
||||||
{
|
{
|
||||||
try
|
liberator.dump((msg || "") + (new Error()).stack.replace(/.*\n/, ""));
|
||||||
{
|
|
||||||
someStatisticallyImprobableVariableName.foo = 1;
|
|
||||||
}
|
|
||||||
catch (e)
|
|
||||||
{
|
|
||||||
liberator.dump((msg || "") + e.stack);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// with (liberator) means, liberator is the default namespace "inside" eval
|
// with (liberator) means, liberator is the default namespace "inside" eval
|
||||||
|
|||||||
Reference in New Issue
Block a user