From 8ae0b211f1d29af5749babd9851f2e468ec4786f Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 20 Mar 2009 16:04:23 +1100 Subject: [PATCH] Define missing window#BrowserStop and window#toJavascriptConsole. --- common/content/buffer.js | 16 ++-------------- xulmus/content/config.js | 12 +++++++++++- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index 8534f4ee..15b09ae0 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -215,13 +215,7 @@ function Buffer() //{{{ mappings.add(myModes, [""], "Stop loading", - function () - { - if(config.name == "Xulmus") - getBrowser().mCurrentBrowser.stop(); - else - window.BrowserStop(); - }); + function () { window.BrowserStop(); }); // scrolling mappings.add(myModes, ["j", "", ""], @@ -603,13 +597,7 @@ function Buffer() //{{{ commands.add(["st[op]"], "Stop loading", - function () - { - if (config.name == "Xulmus") - getBrowser().mCurrentBrowser.stop(); - else - window.BrowserStop(); - }, + function () { window.BrowserStop(); }, { argCount: "0" }); commands.add(["vie[wsource]"], diff --git a/xulmus/content/config.js b/xulmus/content/config.js index 27c6eb87..e4a28018 100755 --- a/xulmus/content/config.js +++ b/xulmus/content/config.js @@ -182,6 +182,7 @@ const config = { //{{{ liberator.loadModule("hints", Hints); // Load the Player module liberator.loadModule("player", Player); + //////////////////////////////////////////////////////////////////////////////// ////////////////////// STYLES ////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ @@ -489,8 +490,17 @@ const config = { //{{{ options.add(["urlseparator"], "Set the separator regexp used to separate multiple URL args", "string", ",\\s"); + //}}} + + // TODO: mention this to SB devs, they seem keen to provide these + // functions to make porting from FF as simple as possible. + window.toJavaScriptConsole = function () { + toOpenWindowByType("global:console", "chrome://global/content/console.xul"); + } + window.BrowserStop = function () { + getBrowser().mCurrentBrowser.stop(); + } } - //}}} }; //}}} // vim: set fdm=marker sw=4 ts=4 et: