aboutsummaryrefslogtreecommitdiffstats
path: root/stella.js
diff options
context:
space:
mode:
authorJagua2011-01-02 02:47:09 +0900
committerJagua2011-01-02 02:47:09 +0900
commit6f725e59b6024d9a12bd30d1bc686988277616ee (patch)
tree14985cd4456c994eb5018cb02731370b4b6f8447 /stella.js
parent00cb16b2e1852d54626495ddd53a625b2286e144 (diff)
downloadvimperator-plugins-6f725e59b6024d9a12bd30d1bc686988277616ee.tar.bz2
support "マイリストを連続再生する"
Diffstat (limited to 'stella.js')
-rw-r--r--stella.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/stella.js b/stella.js
index eb93a19..60df22f 100644
--- a/stella.js
+++ b/stella.js
@@ -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)));