# nlフィルタ定義(文字コード判定用なのでこの行は削除しないこと)
#original 20170602

[Script]
Name = Playbackrate Changer[HTML5]
URL = www\.nicovideo\.jp\/watch\/
Require = 'html5';
Append<
/* Playbackrate Changer */
function func1(){
	var vid = document.getElementsByTagName("video");
	speed.addEventListener('input', function(){
	vid[0].playbackRate = +this.value;
	output1.innerHTML = +this.value;
	output2.innerHTML=vid[0].playbackRate;
	})
	}
if( window.addEventListener ){window.addEventListener( 'load', func1(), false );}
else if( window.attachEvent ){window.attachEvent( 'onload', func1());}
else {window.onload = func1();}
/* Playbackrate Changer(END) */
>

[Replace]
Name = Kill official playbackRate controller[HTML5]
URL = [^/]+.nimg.jp/(?:web/)?scripts/pages/watch/watch_(?:app|dll).js
Multi = TRUE
Match<
playbackRate
>
Replace<
playbackRate_
>

[Replace]
Name = Pl-Ch-Elem[HTML5]
URL = www\.nicovideo\.jp\/watch\/
Require = 'html5';
Match<
</body>
>
Replace<
/* Playbackrate-Changer-Element(pce) */
<div id="pce-wrapper">
<div id="pce-title"><h3>Playbackrate Changer</h3></div>
<div><input id="speed" type="range" min="0" max="5" step="0.01" value="1"></div>
<div id="output1"></div>
<div id="output2"></div>
</div>
<style>
#pce-wrapper{
position:absolute;
z-index: 10000; /*siteHeader.css line84 override*/
left:120px;
top:900px;
background:white;
width: 200px;
height: 80px;
border-style: solid;
border-width: 2px;
border-color: grey;
}
</style>
/* pce */
</body>
>
