mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 11:27:58 +01:00
made :setlocal work on tabs, not buffer
This commit is contained in:
1
Donators
1
Donators
@@ -2,6 +2,7 @@
|
||||
<b>Note:</b> If you don't wish to appear on this list when making a donation, please tell me.
|
||||
|
||||
2008:
|
||||
* Takayuki Tsukitani
|
||||
* Victor Nemkov
|
||||
* John Lusth
|
||||
* Thomas Svensen
|
||||
|
||||
@@ -627,13 +627,6 @@ liberator.Buffer = function () //{{{
|
||||
return window.content.document.title;
|
||||
},
|
||||
|
||||
get options()
|
||||
{
|
||||
if (!window.content.document.liberatorOptions)
|
||||
window.content.document.liberatorOptions = {};
|
||||
return window.content.document.liberatorOptions;
|
||||
},
|
||||
|
||||
// returns an XPathResult object
|
||||
evaluateXPath: function (expression, doc, elem, asIterator)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ liberator.Option = function (names, description, type, defaultValue, scope, gett
|
||||
var aValue;
|
||||
|
||||
if (this.scope & liberator.options.OPTION_SCOPE_LOCAL)
|
||||
aValue = liberator.buffer.options[this.name];
|
||||
aValue = liberator.tabs.options[this.name]; // TODO: does that work without has("tabs")?
|
||||
if ((this.scope & liberator.options.OPTION_SCOPE_GLOBAL) && (aValue == undefined))
|
||||
aValue = value;
|
||||
|
||||
@@ -81,6 +81,7 @@ liberator.Option = function (names, description, type, defaultValue, scope, gett
|
||||
return aValue;
|
||||
}
|
||||
);
|
||||
|
||||
this.__defineSetter__("value",
|
||||
function (newValue)
|
||||
{
|
||||
|
||||
@@ -538,6 +538,16 @@ liberator.Tabs = function () //{{{
|
||||
|
||||
get count() { return getBrowser().mTabs.length; },
|
||||
|
||||
// used for :setlocal
|
||||
get options()
|
||||
{
|
||||
var tab = this.getTab();
|
||||
if (!tab.liberatorOptions)
|
||||
tab.liberatorOptions = {};
|
||||
|
||||
return tab.liberatorOptions;
|
||||
},
|
||||
|
||||
get tabStrip()
|
||||
{
|
||||
if (liberator.config.hostApplication == "Firefox")
|
||||
|
||||
Reference in New Issue
Block a user