summaryrefslogtreecommitdiffstats
path: root/application/palemoon/base/content/browser.js
diff options
context:
space:
mode:
Diffstat (limited to 'application/palemoon/base/content/browser.js')
-rw-r--r--application/palemoon/base/content/browser.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/application/palemoon/base/content/browser.js b/application/palemoon/base/content/browser.js
index 4e753d422..16b7c0019 100644
--- a/application/palemoon/base/content/browser.js
+++ b/application/palemoon/base/content/browser.js
@@ -412,6 +412,10 @@ var gURLBarSettings = {
},
writePlaceholder: function() {
+ if (!gURLBar) {
+ return;
+ }
+
let attribute = "placeholder";
let prefs = this.prefSuggests.map(pref => {
return this.prefSuggest + pref;
@@ -1147,7 +1151,7 @@ var gBrowserInit = {
// Setup click-and-hold gestures access to the session history
// menus if global click-and-hold isn't turned on
- if (!getBoolPref("ui.click_hold_context_menus", false))
+ if (!Services.prefs.getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers();
// Initialize the full zoom setting.
@@ -1783,7 +1787,7 @@ function BrowserGoHome(aEvent) {
case "tabshifted":
case "tab":
urls = homePage.split("|");
- var loadInBackground = getBoolPref("browser.tabs.loadBookmarksInBackground", false);
+ var loadInBackground = Services.prefs.getBoolPref("browser.tabs.loadBookmarksInBackground", false);
gBrowser.loadTabs(urls, loadInBackground);
break;
case "window":
@@ -3402,7 +3406,7 @@ function BrowserCustomizeToolbar() {
TabsInTitlebar.allowedBy("customizing-toolbars", false);
var customizeURL = "chrome://global/content/customizeToolbar.xul";
- gCustomizeSheet = getBoolPref("toolbar.customization.usesheet", false);
+ gCustomizeSheet = Services.prefs.getBoolPref("toolbar.customization.usesheet", false);
if (gCustomizeSheet) {
let sheetFrame = document.createElement("iframe");
@@ -3471,6 +3475,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
// Update the urlbar
if (gURLBar) {
+ gURLBarSettings.writePlaceholder();
URLBarSetURI();
XULBrowserWindow.asyncUpdateUI();
BookmarkingUI.updateStarState();
@@ -3486,7 +3491,7 @@ function BrowserToolboxCustomizeDone(aToolboxChanged) {
cmd.removeAttribute("disabled");
// make sure to re-enable click-and-hold
- if (!getBoolPref("ui.click_hold_context_menus", false))
+ if (!Services.prefs.getBoolPref("ui.click_hold_context_menus", false))
SetClickAndHoldHandlers();
gBrowser.selectedBrowser.focus();
@@ -4476,14 +4481,15 @@ nsBrowserAccess.prototype = {
}
let loadInBackground = gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground");
- let referrer = aOpener ? makeURI(aOpener.location.href) : null;
+ let openerWindow = (aContext & Ci.nsIBrowserDOMWindow.OPEN_NO_OPENER) ? null : aOpener;
let tab = win.gBrowser.loadOneTab(aURI ? aURI.spec : "about:blank", {
triggeringPrincipal: triggeringPrincipal,
referrerURI: referrer,
referrerPolicy: referrerPolicy,
fromExternal: isExternal,
- inBackground: loadInBackground});
+ inBackground: loadInBackground,
+ opener: openerWindow });
let browser = win.gBrowser.getBrowserForTab(tab);
if (gPrefService.getBoolPref("browser.tabs.noWindowActivationOnExternal")) {
@@ -5338,9 +5344,6 @@ function handleDroppedLink(event, urlOrLinks, name)
let lastLocationChange = gBrowser.selectedBrowser.lastLocationChange;
- let userContextId = gBrowser.selectedBrowser
- .getAttribute("usercontextid") || 0;
-
let inBackground = Services.prefs.getBoolPref("browser.tabs.loadInBackground");
if (event.shiftKey)
inBackground = !inBackground;
@@ -5359,7 +5362,6 @@ function handleDroppedLink(event, urlOrLinks, name)
replace: true,
allowThirdPartyFixup: false,
postDatas,
- userContextId,
});
}
});