aboutsummaryrefslogtreecommitdiffstats
path: root/nico_related_videos.js
diff options
context:
space:
mode:
authoranekos2009-08-27 12:37:51 +0000
committeranekos2009-08-27 12:37:51 +0000
commit9f691e05aae8b0ad1c4f3fe559b0f2f2c9559ea2 (patch)
tree689761603b8b70c9830913d57cfa5c6f5422787b /nico_related_videos.js
parentb17b6f377d2a877f8fa15bdd561e9d2f251208e6 (diff)
downloadvimperator-plugins-9f691e05aae8b0ad1c4f3fe559b0f2f2c9559ea2.tar.bz2
Follow HEAD
for http://vimperator.org/trac/gitweb/?p=liberator.git;a=commit;h=f20c2b315bb05c2e88d0c672f07dc229cc9267d2 git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@35099 d0d07461-0603-4401-acd4-de1884942a52
Diffstat (limited to 'nico_related_videos.js')
-rw-r--r--nico_related_videos.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/nico_related_videos.js b/nico_related_videos.js
index 40700ec..14bcc97 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.3.0
+// @version 1.3.1
// ==/VimperatorPlugin==
//
// Author:
@@ -78,8 +78,8 @@
commands.addUserCommand(
['nicorelated'],
'niconico related videos',
- function (url, bang) {
- (url.string === undefined) || (url = url.string);
+ function (args) {
+ let url = args.string;
url = (function () {
if (url == nothing)
return 'http://www.nicovideo.jp/';
@@ -90,11 +90,11 @@
if (url.indexOf('http://') == -1)
return 'http://www.nicovideo.jp/search/' + encodeURIComponent(url);
})() || url;
- liberator.open(url, bang ? liberator.NEW_TAB : liberator.CURRENT_TAB);
+ liberator.open(url, args.bang ? liberator.NEW_TAB : liberator.CURRENT_TAB);
},
{
bang: true,
- completer: function (context, arg, bang) {
+ completer: function (context, arg) {
if ((buffer.URL != last.url) || !last.completions.length) {
last.completions = [];
getRelatedVideos().forEach(function (it) last.completions.push([it.url, it.title]));