diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/content/buffer.js | 18 | ||||
-rw-r--r-- | common/content/events.js | 28 | ||||
-rw-r--r-- | common/content/tabs.js | 14 | ||||
-rw-r--r-- | common/content/ui.js | 12 |
4 files changed, 32 insertions, 40 deletions
diff --git a/common/content/buffer.js b/common/content/buffer.js index 478d0571..cfd40399 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -215,7 +215,13 @@ function Buffer() //{{{ mappings.add(myModes, ["<C-c>"], "Stop loading", - function () { window.BrowserStop(); }); + function () + { + if(config.stop) + config.stop(); + else + window.BrowserStop(); + }); // scrolling mappings.add(myModes, ["j", "<Down>", "<C-e>"], @@ -597,7 +603,17 @@ function Buffer() //{{{ commands.add(["st[op]"], "Stop loading", +<<<<<<< HEAD:common/content/buffer.js + function () + { + if (config.stop) + config.stop(); + else + window.BrowserStop(); + }, +======= function () { window.BrowserStop(); }, +>>>>>>> a9f04ee3d00b282e7a91b37eb23168fb39e9de5b:common/content/buffer.js { argCount: "0" }); commands.add(["vie[wsource]"], diff --git a/common/content/events.js b/common/content/events.js index 341adcc3..5a1b1ad5 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -1222,32 +1222,8 @@ function Events() //{{{ return; } - if (config.name == "Muttator") - { - // we switch to -- MESSAGE -- mode for Muttator, when the main HTML widget gets focus - if (hasHTMLDocument(win) || elem instanceof HTMLAnchorElement) - { - if (config.isComposeWindow) - { - //liberator.dump("Compose editor got focus"); - modes.set(modes.INSERT, modes.TEXTAREA); - } - else if (liberator.mode != modes.MESSAGE) - liberator.mode = modes.MESSAGE; - return; - } - } - - if (config.name == "Xulmus") - { - // Switch to -- PLAYER -- mode for Songbird Media Player. - if (config.isPlayerWindow) - liberator.mode = modes.PLAYER; - else - liberator.mode = modes.NORMAL; - return; - } - + if (config.focusChange()) + return void config.focusChange(win); urlbar = document.getElementById("urlbar"); if (elem == null && urlbar && urlbar.inputField == lastFocus) diff --git a/common/content/tabs.js b/common/content/tabs.js index c3cfbd10..04ed7a63 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -109,17 +109,14 @@ function Tabs() //{{{ // hide tabs initially if (config.name == "Vimperator") getBrowser().mStrip.getElementsByClassName("tabbrowser-tabs")[0].collapsed = true; -/* - if (config.name == "Xulmus") - getBrowser()._strip.getElementsByClassName( -*/ + /////////////////////////////////////////////////////////////////////////////}}} ////////////////////// OPTIONS ///////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////{{{ options.add(["showtabline", "stal"], "Control when to show the tab bar of opened web pages", - "number", config.name == "Vimperator" ? 2 : 0, + "number", config.optionDefaults['stal'], { setter: function (value) { @@ -151,7 +148,7 @@ function Tabs() //{{{ validator: Option.validateCompleter }); - if (config.name == "Vimperator" || config.name == "Xulmus") + if (config.hasTabbrowser) { options.add(["activate", "act"], "Define when tabs are automatically activated", @@ -241,7 +238,7 @@ function Tabs() //{{{ function (count) { tabs.select("-" + (count < 1 ? 1 : count), true); }, { flags: Mappings.flags.COUNT }); - if (config.name == "Vimperator" || config.name == "Xulmus") + if (config.hasTabbrowser) { mappings.add([modes.NORMAL], ["b"], "Open a prompt to switch buffers", @@ -452,7 +449,7 @@ function Tabs() //{{{ function () { tabs.select(0, false); }, { argCount: "0" }); - if (config.name == "Vimperator" || config.name == "Xulmus") + if (config.hasTabbrowser) { // TODO: "Zero count" if 0 specified as arg, multiple args and count ranges? commands.add(["b[uffer]"], @@ -587,6 +584,7 @@ function Tabs() //{{{ }); } + /* Why not xulmus? */ if (liberator.has("session") && config.name != "Xulmus") { // TODO: extract common functionality of "undoall" diff --git a/common/content/ui.js b/common/content/ui.js index 583104bd..05ebe89e 100644 --- a/common/content/ui.js +++ b/common/content/ui.js @@ -2105,22 +2105,24 @@ function StatusLine() //{{{ } // when session information is available, add [+] when we can go backwards - if (config.name == "Vimperator") + let modified = ""; + if (window.getWebNavigation) { let sh = window.getWebNavigation().sessionHistory; - let modified = ""; if (sh.index > 0) modified += "+"; if (sh.index < sh.count -1) modified += "-"; + } + if (liberator.has("bookmarks")) { if (bookmarks.isBookmarked(buffer.URL)) modified += "\u2764"; // a heart symbol: ❤ //modified += "\u2665"; // a heart symbol: ♥ - - if (modified) - url += " [" + modified + "]"; } + if (modified) + url += " [" + modified + "]"; + urlWidget.value = url; }, |