diff options
author | anekos | 2008-10-22 05:30:43 +0000 |
---|---|---|
committer | anekos | 2008-10-22 05:30:43 +0000 |
commit | b0c21503dd991b98e86e11f8823450430a5ed0db (patch) | |
tree | 184065e65d9de63b2415f166f148ea0d55842edd | |
parent | 67b3976f3286b85b619332468a7402ac4a39c74a (diff) | |
download | vimperator-plugins-b0c21503dd991b98e86e11f8823450430a5ed0db.tar.bz2 |
新しいタブで開けるようにした。
(:nicorelated! :ネコネコ動画)
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@21832 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | nico_related_videos.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nico_related_videos.js b/nico_related_videos.js index 686a0f0..75389fc 100644 --- a/nico_related_videos.js +++ b/nico_related_videos.js @@ -2,7 +2,7 @@ // @name Nico Related Videos // @description-ja ニコニコ動画のオススメ動画のリスト // @license Creative Commons 2.1 (Attribution + Share Alike) -// @version 1.1.0 +// @version 1.2.0 // ==/VimperatorPlugin== // // Author: @@ -17,6 +17,8 @@ // ":" タグ名 => タグ検索 // その他文字列 => ニコニコ動画でそれを検索 // +// "!" をつけると新しいタブで開く。 +// // Link: // http://d.hatena.ne.jp/nokturnalmortum/20080910#1220991278 @@ -76,7 +78,7 @@ commands.addUserCommand( ['nicorelated'], 'niconico related videos', - function (url) { + function (url, bang) { (url.string === undefined) || (url = url.string); url = (function () { if (url == nothing) @@ -88,9 +90,10 @@ if (url.indexOf('http://') == -1) return 'http://www.nicovideo.jp/search/' + encodeURIComponent(url); })() || url; - liberator.open(url); + liberator.open(url, bang ? liberator.NEW_TAB : liberator.CURRENT_TAB); }, { + bang: true, completer: function (args) { if (buffer.URL != last.url) { last.completions = []; |