mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
fd33841755
--HG-- extra : rebase_source : cc42d98604e38528f3bc9941dce4f15ec8ad5d67
31 lines
1.1 KiB
JavaScript
31 lines
1.1 KiB
JavaScript
/* -*- Mode: javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
let Cc = Components.classes;
|
|
let Ci = Components.interfaces;
|
|
let Cu = Components.utils;
|
|
|
|
// Bug 671101 - directly using webNavigation in this context
|
|
// causes docshells to leak
|
|
__defineGetter__("webNavigation", function () {
|
|
return docShell.QueryInterface(Ci.nsIWebNavigation);
|
|
});
|
|
|
|
addMessageListener("WebNavigation:LoadURI", function (message) {
|
|
let flags = message.json.flags || webNavigation.LOAD_FLAGS_NONE;
|
|
|
|
webNavigation.loadURI(message.json.uri, flags, null, null, null);
|
|
});
|
|
|
|
addMessageListener("Browser:HideSessionRestoreButton", function (message) {
|
|
// Hide session restore button on about:home
|
|
let doc = content.document;
|
|
let container;
|
|
if (doc.documentURI.toLowerCase() == "about:home" &&
|
|
(container = doc.getElementById("sessionRestoreContainer"))){
|
|
container.hidden = true;
|
|
}
|
|
});
|