1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 11:07:59 +01:00

Fix last commit

This commit is contained in:
Kris Maglione
2009-01-08 14:14:57 -05:00
parent bfe47dff89
commit f901cb1f42

View File

@@ -1123,10 +1123,8 @@ function Buffer() //{{{
{ {
case liberator.NEW_TAB: case liberator.NEW_TAB:
case liberator.NEW_BACKGROUND_TAB: case liberator.NEW_BACKGROUND_TAB:
let invertLogic = !options.getPref("browser.tabs.loadInBackground");
let backgroundDesired = (where == liberator.NEW_BACKGROUND_TAB);
ctrlKey = true; ctrlKey = true;
shiftKey = invertLogic ? backgroundDesired : !backgroundDesired; shiftKey = (where != liberator.NEW_BACKGROUND_TAB);
break; break;
case liberator.NEW_WINDOW: case liberator.NEW_WINDOW:
shiftKey = true; shiftKey = true;
@@ -1140,11 +1138,14 @@ function Buffer() //{{{
elem.focus(); elem.focus();
let evt = doc.createEvent("MouseEvents"); let evt = doc.createEvent("MouseEvents");
options.withContext(function () {
options.setPref("browser.tabs.loadInBackground", true);
["mousedown", "mouseup", "click"].forEach(function (event) { ["mousedown", "mouseup", "click"].forEach(function (event) {
evt.initMouseEvent(event, true, true, view, 1, offsetX, offsetY, 0, 0, evt.initMouseEvent(event, true, true, view, 1, offsetX, offsetY, 0, 0,
ctrlKey, /*altKey*/0, shiftKey, /*metaKey*/ ctrlKey, 0, null); ctrlKey, /*altKey*/0, shiftKey, /*metaKey*/ ctrlKey, 0, null);
elem.dispatchEvent(evt); elem.dispatchEvent(evt);
}); });
});
}, },
/** /**