diff options
Diffstat (limited to 'stella.js')
-rw-r--r-- | stella.js | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -1,5 +1,5 @@ /* {{{ -Copyright (c) 2008-2010, anekos. +Copyright (c) 2008-2011, anekos. All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -39,7 +39,7 @@ let PLUGIN_INFO = <name lang="ja">すてら</name> <description>For Niconico/YouTube/Vimeo, Add control commands and information display(on status line).</description> <description lang="ja">ニコニコ動画/YouTube/Vimeo 用。操作コマンドと情報表示(ステータスライン上に)追加します。</description> - <version>0.32.4</version> + <version>0.32.5</version> <author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author> <license>new BSD License (Please read the source code comments of this plugin)</license> <license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license> @@ -883,10 +883,7 @@ Thanks: get pageinfo () { let doc = content.document; - let wd = doc.querySelector('#watch-description > div > span > span.watch-video-date'); - let desc = wd.nextSibling; - while (desc && desc.tagName != 'SPAN') - desc = desc.nextSibling; + let desc = doc.querySelector('#eow-description'); return [ [ 'comment', @@ -894,7 +891,10 @@ Thanks: ], [ 'tags', - U.toXML(doc.querySelector('#watch-tags > div').innerHTML) + XMLList([ + <span>[<a href={v.href}>{v.textContent}</a>]</span> + for ([, v] in Iterator(doc.querySelectorAll('#eow-tags > li > a'))) + ].join('')) ], [ 'quality', @@ -1556,7 +1556,7 @@ Thanks: 'play', 'pause', 'comment', - 'repeat', + 'repeating', 'fullscreen', 'fetch', { @@ -1858,13 +1858,13 @@ Thanks: let self = this; function setEvents (name, elem) { - ['click', 'popupshowing'].forEach(function (eventName) { + ['click', 'command', 'popupshowing'].forEach(function (eventName) { let onEvent = self['on' + U.capitalize(name) + U.capitalize(eventName)]; onEvent && elem.addEventListener(eventName, function (event) { - if (eventName != 'click' || event.button == 0) { - onEvent.apply(self, arguments); - self.update(); - } + if (eventName == 'click' && event.button != 0) + return; + onEvent.apply(self, arguments); + self.update(); }, false); }); } @@ -2104,7 +2104,7 @@ Thanks: rel instanceof RelatedTag ? 'Tag: ' : ''; elem.setAttribute('label', prefix + rel.description); - elem.addEventListener('click', clickEvent(rel.command), false); + elem.addEventListener('command', clickEvent(rel.command), false); relmenu.appendChild(elem); }, this); }, |