// Copyright (c) 2006-2008 by Martin Stubenschrott <stubenschrott@vimperator.org>
// Copyright (c) 2007-2011 by Doug Kearns <dougkearns@gmail.com>
-// Copyright (c) 2008-2011 by Kris Maglione <maglione.k at Gmail>
+// Copyright (c) 2008-2012 Kris Maglione <maglione.k at Gmail>
//
// This work is licensed for reuse under an MIT license. Details are
// given in the LICENSE.txt file included with this file.
-/* use strict */
+"use strict";
/** @scope modules */
tabs.switchTo(event.originalTarget.getAttribute("identifier"));
};
- this.tabBinding = styles.system.add("tab-binding", "chrome://browser/content/browser.xul", String.replace(<><![CDATA[
+ this.tabBinding = styles.system.add("tab-binding", "chrome://browser/content/browser.xul", literal(/*
xul|tab { -moz-binding: url(chrome://dactyl/content/bindings.xml#tab) !important; }
- ]]></>, /tab-./g, function (m) config.OS.isMacOSX ? "tab-mac" : m),
+ */).replace(/tab-./g, function (m) config.OS.isMacOSX ? "tab-mac" : m),
false, true);
this.timeout(function () {
if (!node("dactyl-tab-number")) {
let img = node("tab-icon-image");
if (img) {
- let dom = DOM(<xul xmlns:xul={XUL} xmlns:html={XHTML}>
- <xul:hbox highlight="tab-number"><xul:label key="icon" align="center" highlight="TabIconNumber" class="dactyl-tab-icon-number"/></xul:hbox>
- <xul:hbox highlight="tab-number"><html:div key="label" highlight="TabNumber" class="dactyl-tab-number"/></xul:hbox>
- </xul>.elements(), document).appendTo(img.parentNode);
+ let dom = DOM([
+ ["xul:hbox", { highlight: "tab-number" },
+ ["xul:label", { key: "icon", align: "center", highlight: "TabIconNumber",
+ class: "dactyl-tab-icon-number" }]],
+ ["xul:hbox", { highlight: "tab-number" },
+ ["html:div", { key: "label", highlight: "TabNumber",
+ class: "dactyl-tab-number" }]]],
+ document).appendTo(img.parentNode);
update(tab, {
get dactylOrdinal() Number(dom.nodes.icon.value),
if (func)
func = bind(function (func) { func(this._groups) }, this, func);
- if (window.TabView && TabView._initFrame)
- TabView._initFrame(func);
+ if (window.TabView && window.TabView._initFrame)
+ window.TabView._initFrame(func);
this._groups = iframe ? iframe.contentWindow : null;
if (this._groups && !func)
services.sessionStore.setTabState(to, tabState);
}
}, {
- load: function init_load() {
+ load: function initLoad() {
tabs.updateTabCount();
},
- commands: function init_commands() {
+ commands: function initCommands() {
[
{
name: ["bd[elete]"],
{ argCount: "0" });
}
},
- completion: function init_completion() {
+ completion: function initCompletion() {
completion.buffer = function buffer(context, visible) {
let { tabs } = modules;
group[1].push([i, tab.linkedBrowser]);
});
- context.pushProcessor(0, function (item, text, next) <>
- <span highlight="Indicator" style="display: inline-block;">{item.indicator}</span>
- { next.call(this, item, text) }
- </>);
+ context.pushProcessor(0, function (item, text, next) [
+ ["span", { highlight: "Indicator", style: "display: inline-block;" },
+ item.indicator],
+ next.call(this, item, text)
+ ]);
context.process[1] = function (item, text) template.bookmarkDescription(item, template.highlightFilter(text, this.filter));
context.anchored = false;
};
};
},
- events: function init_events() {
+ events: function initEvents() {
let tabContainer = config.tabbrowser.mTabContainer;
function callback() {
tabs.timeout(function () { this.updateTabCount(); });
events.listen(tabContainer, event, callback, false);
events.listen(tabContainer, "TabSelect", tabs.closure._onTabSelect, false);
},
- mappings: function init_mappings() {
+ mappings: function initMappings() {
mappings.add([modes.COMMAND], ["<C-t>", "<new-tab-next>"],
"Execute the next mapping in a new tab",
{ count: true });
}
},
- options: function init_options() {
+ options: function initOptions() {
options.add(["showtabline", "stal"],
"Define when the tab bar is visible",
"string", true,