mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 11:18:00 +01:00
Fix liberator.open/browser.tabs.loadInBackground bug
This commit is contained in:
@@ -482,7 +482,7 @@ function Buffer() //{{{
|
||||
if (arg && (liberator.has("Win32") || arg[0] != ">"))
|
||||
return liberator.echoerr("E488: Trailing characters");
|
||||
|
||||
options.temporaryContext(function () {
|
||||
options.withContext(function () {
|
||||
if (arg)
|
||||
{
|
||||
options.setPref("print.print_to_file", "true");
|
||||
|
||||
@@ -1109,10 +1109,10 @@ const liberator = (function () //{{{
|
||||
if (!liberator.has("tabs"))
|
||||
return open(urls, liberator.NEW_WINDOW);
|
||||
|
||||
let tab = getBrowser().addTab(url, null, null, postdata);
|
||||
|
||||
if (where == liberator.NEW_TAB)
|
||||
getBrowser().selectedTab = tab;
|
||||
options.withContext(function () {
|
||||
options.setPref("browser.tabs.loadInBackground", true);
|
||||
getBrowser().loadOneTab(url, null, null, postdata, where == liberator.NEW_BACKGROUND_TAB);
|
||||
});
|
||||
break;
|
||||
|
||||
case liberator.NEW_WINDOW:
|
||||
|
||||
@@ -1026,7 +1026,7 @@ function Options() //{{{
|
||||
storePreference(k, v);
|
||||
},
|
||||
|
||||
temporaryContext: function (fn, self)
|
||||
withContext: function (fn, self)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user