From 6f725e59b6024d9a12bd30d1bc686988277616ee Mon Sep 17 00:00:00 2001 From: Jagua Date: Sun, 2 Jan 2011 02:47:09 +0900 Subject: support "マイリストを連続再生する" --- stella.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'stella.js') 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+)/, [ ['', ':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+)/, [ ['', ':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*'); + let re = RegExp('(?:^|[\u3000\\s\\>])([^\u3000\\s\\>]+)\\s*'); let r = re.exec(comment); if (r) videos.push(new RelatedID(link, r[1].slice(-20))); -- cgit v1.2.3