mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 02:38:00 +01:00
Only apply tab binding if tab numbers are enabled.
This commit is contained in:
@@ -204,11 +204,6 @@ function Tabs() //{{{
|
||||
],
|
||||
validator: Option.validateCompleter
|
||||
});
|
||||
let fragment = liberator.has("MacUnix") ? "tab-mac" : "tab";
|
||||
// TODO: Add option, or only apply when go~=[nN]
|
||||
styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul",
|
||||
".tabbrowser-tab { -moz-binding: url(chrome://liberator/content/bindings.xml#" + fragment + ") !important; }");
|
||||
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////}}}
|
||||
@@ -663,6 +658,18 @@ function Tabs() //{{{
|
||||
yield [i, browsers[i]];
|
||||
},
|
||||
|
||||
get tabsBound() {
|
||||
return Boolean(styles.get(true, "tab-binding"))
|
||||
},
|
||||
set tabsBound(val) {
|
||||
let fragment = liberator.has("MacUnix") ? "tab-mac" : "tab";
|
||||
if (!val)
|
||||
styles.removeSheet(true, "tab-binding");
|
||||
else if (!this.tabsBound)
|
||||
styles.addSheet(true, "tab-binding", "chrome://browser/content/browser.xul",
|
||||
".tabbrowser-tab { -moz-binding: url(chrome://liberator/content/bindings.xml#" + fragment + ") !important; }");
|
||||
},
|
||||
|
||||
get count() getBrowser().mTabs.length,
|
||||
|
||||
get options()
|
||||
|
||||
Reference in New Issue
Block a user