From 25a9567589e72cbbfbe87dd2086cfd1a1f4d402f Mon Sep 17 00:00:00 2001 From: anekos Date: Sun, 14 Dec 2008 13:46:03 +0000 Subject: コマンド追加 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@26682 d0d07461-0603-4401-acd4-de1884942a52 --- foxytunes.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'foxytunes.js') diff --git a/foxytunes.js b/foxytunes.js index a7fa57d..42a3ae4 100644 --- a/foxytunes.js +++ b/foxytunes.js @@ -3,7 +3,7 @@ var PLUGIN_INFO = Foxy Tunes for FoxyTunes for FoxyTunes - 1.2 + 0.3 anekos 2.0pre 2.0pre @@ -14,12 +14,16 @@ var PLUGIN_INFO = == Commands == +:ftplay +:ftpause + +:ftnext + +:ftprevious +:ftvolume ]]> ]]> ; @@ -41,9 +45,11 @@ var PLUGIN_INFO = let player = Components.classes['@foxytunes.org/FoxyTunesEngine/FoxyTunesService;1'].getService(); // foxytunesDispatchPlayerCommand - ['Pause', 'Play'].forEach(function (name) { + ['Pause', 'Play', 'Next', 'Previous'].forEach(function (name) { + let ln = name.toLowerCase(); + let lnm = ln.match(/(..)(.*)/); commands.addUserCommand( - ['ft' + name.toLowerCase()], + ['ft' + lnm[1] + '[' + lnm[2] + ']'], name + ' - FoxyTunes', function () foxytunesDispatchPlayerCommand(name, true), true -- cgit v1.2.3