GM: Play next video automatically on NicoVideo
2008.04.08
/* How does it work ? */
This Greasemonkey script add feature that jump to next video automaticaly on NicoVideo (ニコニコ動画).
/* Install */
This script already uploaded to Userscripts.org. So please install it from this page.
nicovideoautoplay.user.js
/* Settings */
Configurable items:
| name | description | value | type |
| jumpCond | Condition for judgment. | Function return true/false | Function |
| pattern | Regular expression for to get series sub-string. | RegExp | |
| delay | Delay time until jump to next video. | Number | |
| interval.ready | Interval for the player is ready or not. | Number | |
| interval.jump | Interval for the video finished or not. | Number |
Sample settings:
/////////////// configurations //////////////// var cfg = { // condition for jump to next video jumpCond: function(hist, vlen){ var sz = hist.length; return 3 <= sz && vlen - hist[sz-1] < 3 && hist[sz-1] === hist[sz-2] && hist[sz-2] === hist[sz-3]; }, // regular expression for to get series sub-string pattern: /(part|その)[\.\s]?\d+/gi, // delay time until jump to next video delay: 2000, interval: { // interval for the player is ready or not ready: 1000, // interval for the video finished or not jump: 300 } } ///////////////////////////////////////////////
/* Conclusion */
I though I only write script for AutoPagerize.
However, This solution is not better because AutoPagerize insert next page into current page. That’s why there are many flash player instance in one page.
Thank you for following article:
ニコニコ動画のFlashプレーヤーをGreasemonkeyから操作するためのスクリプト
And these are test video:
enjoy NicoVideo! 
3 Comments
日本語
English
20 May 2008 - 11:47
いくつかの動画で検証しました。
その1等で書かれているものはかなり飛んだり飛ばなかったりの
バラつきがあるようですね。
あと、確実に飛ばない分割動画の例を貼っておきます。
タイムマシン①
http://www.nicovideo.jp/watch/sm2407756
丸付き数字
メーデー!2 「空中衝突」 (1/4)
http://www.nicovideo.jp/watch/sm2099425
x/x で書かれている
分割動画では作者により表記の揺れがかなりあるとおもわれるので
多くのパターンに対応するのは大変そうですが、他に無い面白い
スクリプトだとおもいますので期待してます。
20 May 2008 - 14:39
mnstさん:
検証&コメントありがとうございます!
飛んだり飛ばなかったりの問題については処理方法を根本的に変更することで安定を図るつもりです。暫しお待ちを^^
またユーザ視点では「飛ぶのか飛ばないのかわからない」というのもストレスだと思いますので、結果をページのどこかに表示したいと思います。
x/x形式については開発バージョン(未リリース)にて暫定対応しました。が、ご指摘の通り表記揺れが多く新機能としてリリースしてよいものか悩ましいところです。
ご意見・要望などありましたらまたコメントいただけると嬉しいです。
07 Jun 2008 - 17:53
Wrapper用に修正してたニコニコ動画向けGreasemonkeyのメモ…
Wrapperのために修正をしたニコニコ動画用Greasemonkeyスクリプト。
Firefox3も落ち着いてきたので、移行する時に忘れないうちにメモ。
http://web.zgo.jp/wp-content/uploads/nicovideoautoplay.user.js
NicoVideo …