diff options
author | Jagua | 2011-01-02 02:47:09 +0900 |
---|---|---|
committer | Jagua | 2011-01-02 02:47:09 +0900 |
commit | 6f725e59b6024d9a12bd30d1bc686988277616ee (patch) | |
tree | 14985cd4456c994eb5018cb02731370b4b6f8447 /stella.js | |
parent | 00cb16b2e1852d54626495ddd53a625b2286e144 (diff) | |
download | vimperator-plugins-6f725e59b6024d9a12bd30d1bc686988277616ee.tar.bz2 |
support "マイリストを連続再生する"
Diffstat (limited to 'stella.js')
-rw-r--r-- | stella.js | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -106,7 +106,7 @@ function addLocalMappings(buffer, maps) { } addLocalMappings( - /^(http:\/\/(es|www).nicovideo.jp\/watch|http:\/\/(jp|www)\.youtube\.com\/watch|http:\/\/(www\.)?vimeo\.com\/(channels\/(hd)?#)?\d+)/, + /^(http:\/\/(es|www).nicovideo.jp\/(watch|playlist\/mylist)|http:\/\/(jp|www)\.youtube\.com\/watch|http:\/\/(www\.)?vimeo\.com\/(channels\/(hd)?#)?\d+)/, [ ['<C-g>', ':pageinfo S', ], ['p', ':stplay', ], @@ -214,7 +214,7 @@ function addLocalMappings(buffer, maps) { } addLocalMappings( - /^(http:\/\/(es|www).nicovideo.jp\/watch|http:\/\/(jp|www)\.youtube\.com\/watch|http:\/\/(www\.)?vimeo\.com\/(channels\/(hd)?#)?\d+)/, + /^(http:\/\/(es|www).nicovideo.jp\/(watch|playlist\/mylist)|http:\/\/(jp|www)\.youtube\.com\/watch|http:\/\/(www\.)?vimeo\.com\/(channels\/(hd)?#)?\d+)/, [ ['<C-g>', ':pageinfo S', ], ['p', ':stplay', ], @@ -706,7 +706,7 @@ Thanks: get title () undefined, - get isValid () /^http:\/\/(tw|es|de|www)\.nicovideo\.jp\/watch\//.test(U.currentURL), + get isValid () /^http:\/\/(tw|es|de|www)\.nicovideo\.jp\/(watch|playlist\/mylist)\//.test(U.currentURL), get volume () undefined, set volume (value) value, @@ -1150,7 +1150,7 @@ Thanks: set fullscreen (value) (this.large = value), get id () - let (m = U.currentURL.match(/\/watch\/([a-z\d]+)/)) + let (m = U.currentURL.match(/\/(?:watch|playlist\/mylist)\/([a-z\d]+)/)) (m && m[1]), get muted () this.player.ext_isMute(), @@ -1232,10 +1232,10 @@ Thanks: let xpath = self.xpath.comment; let comment = U.xpathGet(xpath).innerHTML; let links = U.xpathGets(xpath + '//a') - .filter(function (it) /watch\//.test(it.href)) + .filter(function (it) /(watch|playlist\/mylist)\//.test(it.href)) .map(function(v) v.textContent); links.forEach(function (link) { - let re = RegExp('(?:^|[\u3000\\s\\>])([^\u3000\\s\\>]+)\\s*<a href="http:\\/\\/www\\.nicovideo\\.\\w+\\/watch\\/' + link + '" class="(watch|video)">'); + let re = RegExp('(?:^|[\u3000\\s\\>])([^\u3000\\s\\>]+)\\s*<a href="http:\\/\\/www\\.nicovideo\\.\\w+\\/(?:watch|playlist\\/mylist)\\/' + link + '" class="(watch|video)">'); let r = re.exec(comment); if (r) videos.push(new RelatedID(link, r[1].slice(-20))); |