From 4814851d840f454be9d34d777e4341449f7e3963 Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 24 Nov 2008 21:53:15 +0000 Subject: meow meow fixes git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24780 d0d07461-0603-4401-acd4-de1884942a52 --- stella.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'stella.js') diff --git a/stella.js b/stella.js index 76987ef..0a01b9b 100644 --- a/stella.js +++ b/stella.js @@ -77,7 +77,7 @@ setf('seekRelative', seek); } setf('playOrPause', this.has('play', 'x', 'pause', 'x') && 'x'); - setf('upDownVolume', this.has('volume', 'rw') && 'x'); + setf('turnUpDownVolume', this.has('volume', 'rw') && 'x'); setf('maxVolume', this.has('volume', 'rw') && 'r'); } @@ -101,7 +101,7 @@ pause: '', muted: '', repeating: '' - // auto setting => seek, seekRelative, playOrPause, upDownVolume, maxVolume + // auto setting => seek, seekRelative, playOrPause, turnUpDownVolume, maxVolume }, icon: null, @@ -158,7 +158,7 @@ seekRelative: function (v) this.currentTime = Math.min(Math.max(this.currentTime + parseInt(v, 10), 0), this.totalTime), - upDownVolume: function (v) + turnUpDownVolume: function (v) this.volume = Math.min(Math.max(this.volume + v, 0), this.maxVolume), get repeating () undefined, @@ -464,7 +464,7 @@ add('mute', 'muted'); add('repeat', 'repeating'); add('comment', 'comment'); - add('volume', 'volume', 'upDownVolume'); + add('volume', 'volume', 'turnUpDownVolume'); add('seek', 'seek', 'seekRelative'); }, @@ -541,15 +541,10 @@ autocommands.add('LocationChange', /.*/, "js liberator.plugins.nico_statusline.onLocationChange()"), update: function () { - try { - this.labels.main.text = this.player.statusText; - this.labels.volume.text = this.player.volume; - // FIXME this.toggles.each... - for (let name in this.toggles) { - this.toggles[name].text = (this.player[name] ? String.toUpperCase : id)(name[0]); - } - } catch (e) { - liberator.log(e); + this.labels.main.text = this.player.statusText; + this.labels.volume.text = this.player.volume; + for (let name in this.toggles) { + this.toggles[name].text = (this.player[name] ? String.toUpperCase : id)(name[0]); } }, -- cgit v1.2.3