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