1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 02:37:58 +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,10 +1138,13 @@ function Buffer() //{{{
elem.focus(); elem.focus();
let evt = doc.createEvent("MouseEvents"); let evt = doc.createEvent("MouseEvents");
["mousedown", "mouseup", "click"].forEach(function (event) { options.withContext(function () {
evt.initMouseEvent(event, true, true, view, 1, offsetX, offsetY, 0, 0, options.setPref("browser.tabs.loadInBackground", true);
ctrlKey, /*altKey*/0, shiftKey, /*metaKey*/ ctrlKey, 0, null); ["mousedown", "mouseup", "click"].forEach(function (event) {
elem.dispatchEvent(evt); evt.initMouseEvent(event, true, true, view, 1, offsetX, offsetY, 0, 0,
ctrlKey, /*altKey*/0, shiftKey, /*metaKey*/ ctrlKey, 0, null);
elem.dispatchEvent(evt);
});
}); });
}, },