From 45b4e5881cb9516b38d6087b6f59cdbf4df26009 Mon Sep 17 00:00:00 2001 From: janus_wel Date: Sun, 28 Sep 2008 00:28:08 +0000 Subject: bugfix: :nnpgetlist in ranking page. git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@20077 d0d07461-0603-4401-acd4-de1884942a52 --- nnp_cooperation.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'nnp_cooperation.js') diff --git a/nnp_cooperation.js b/nnp_cooperation.js index 918cd7c..7d31163 100644 --- a/nnp_cooperation.js +++ b/nnp_cooperation.js @@ -4,7 +4,7 @@ * @description this script give you keyboard opration for NicoNicoPlaylist. * @description-ja NicoNicoPlaylist をキーボードで操作できるようにする。 * @author janus_wel - * @version 0.30 + * @version 0.31 * @minversion 1.2 * ==VimperatorPlugin== * @@ -41,15 +41,16 @@ * :NNPGetList で表示するリストの個数を指定する。デフォルトは 10 。 * * HISTORY - * 2008/07/11 ver. 0.1 initial written. - * 2008/07/15 ver. 0.2 refactoring. - * 2008/09/26 ver. 0.3 change XPath expression. - * correspond mode toggling (fullscreen, random, loop). - * change caption: display now-playing title and mode's statuses. - * mode's statuses are displayed with the following word. + * 2008/07/11 ver. 0.10 - initial written. + * 2008/07/15 ver. 0.20 - refactoring. + * 2008/09/26 ver. 0.30 - change XPath expression. + * - correspond mode toggling (fullscreen, random, loop). + * - change caption: display now-playing title and mode's statuses. + * - mode's statuses are displayed with the following word. * R: random mode is on * L: loop mode is on * F: fullscreen mode is on + * 2008/09/28 ver. 0.31 - bugfix :nnpgetlist in ranking page. * * */ /* @@ -151,7 +152,8 @@ liberator.commands.addUserCommand(['nnpgetlist'], 'get NicoNicoPlaylist', return; } - var playTitle = $f('//h1').textContent; + var titleNode = $f('//h1') || $f('./html/head/title'); + var playTitle = titleNode.textContent; var statuses = ''; if ($f('.//input[contains(@id, "-checkbox-random")]', playlist).checked) statuses += 'R'; if ($f('.//input[contains(@id, "-checkbox-loop")]', playlist).checked) statuses += 'L'; -- cgit v1.2.3