From a661870f1fd1202bd053a4f72573028aa6a18ac4 Mon Sep 17 00:00:00 2001 From: consolers Date: Wed, 29 Nov 2017 18:30:52 +0100 Subject: [PATCH] kludge issue 513 --- modules/window.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/window.js b/modules/window.js index 181aeb4..c20f203 100644 --- a/modules/window.js +++ b/modules/window.js @@ -181,6 +181,18 @@ function window_get_this_browser () { return this.buffers.current.browser; } +function gbrowser(win) { + this.win=win; +} + +gbrowser.prototype = { + constructor: gbrowser, + toString: function () "#", + getBrowserForContentWindow: function (win) { + return this.win.buffers.current.browser; + } +} + function window_initialize (window) { window.conkeror = conkeror; @@ -198,6 +210,8 @@ function window_initialize (window) { // Add a getBrowser() and content to help certain extensions designed // for Firefox work with conkeror window.getBrowser = window_get_this_browser; + window.gBrowser = new gbrowser(window); + window.__defineGetter__('content', function () { return this.buffers.current.browser.contentWindow; -- 2.11.4.GIT