From 032f7c098167753fabddd302013f3cfeb02ab324 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Fri, 20 Mar 2009 13:37:52 +1100 Subject: [PATCH] Add count support to l, L, h and H mappings. --- xulmus/content/player.js | 20 ++++++++++++-------- xulmus/locale/en-US/player.txt | 6 +++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/xulmus/content/player.js b/xulmus/content/player.js index f54b39ea..a54def75 100755 --- a/xulmus/content/player.js +++ b/xulmus/content/player.js @@ -16,7 +16,7 @@ function Player() // {{{ function seek(interval, direction) { interval = interval * 1000; - + let min = 0; let max = gMM.playbackControl.duration; @@ -63,22 +63,26 @@ function Player() // {{{ mappings.add([modes.PLAYER], ["h"], "Seek -10s", - function () { player.seekBackward(10); }); + function (count) { player.seekBackward(count * 10); }, + { flags: Mappings.flags.COUNT }); mappings.add([modes.PLAYER], ["l"], "Seek +10s", - function () { player.seekForward(10); }); + function (count) { player.seekForward(count * 10); }, + { flags: Mappings.flags.COUNT }); mappings.add([modes.PLAYER], ["H"], "Seek -1m", - function () { player.seekBackward(60); }); + function (count) { player.seekBackward(count * 60); }, + { flags: Mappings.flags.COUNT }); mappings.add([modes.PLAYER], ["L"], "Seek +1m", - function () { player.seekForward(60); }); - + function (count) { player.seekForward(count * 60); }, + { flags: Mappings.flags.COUNT }); + mappings.add([modes.PLAYER], - ["=","+"], "Increase Volume by 10%", + ["=", "+"], "Increase Volume by 10%", function () { player.increaseVolume(); }); mappings.add([modes.PLAYER], @@ -226,7 +230,7 @@ function Player() // {{{ gMM.volumeControl.volume = 0.1; else gMM.volumeControl.volume = gMM.volumeControl.volume * 0.9; - }, + } }; //}}} } // }}} diff --git a/xulmus/locale/en-US/player.txt b/xulmus/locale/en-US/player.txt index 8afaf1cc..14768329 100644 --- a/xulmus/locale/en-US/player.txt +++ b/xulmus/locale/en-US/player.txt @@ -66,21 +66,21 @@ ________________________________________________________________________________ |l| -||l|| +||[count]l|| ________________________________________________________________________________ Seek -10s. ________________________________________________________________________________ |H| -||H|| +||[count]H|| ________________________________________________________________________________ Seek +1m. ________________________________________________________________________________ |L| -||L|| +||[count]L|| ________________________________________________________________________________ Seek -1m. ________________________________________________________________________________