nicoLivew

    @@ -8,13 +8,13 @@ javascript:!function() { var L = document.location.href, m = document.createElement('div'), - d = 'v20131231beta'; + d = 'v20131231'; switch (true) { case /live\.nicovideo\.jp\/watch/.test(L): { var h = document.documentElement.innerHTML, h = h.replace(/(\n|\t)/g, ''), h = h.replace(/.+meta.+?url.+?content.+?watch\/(lv[0-9]{5,}).*/, '$1'), - sachiko = '', + Aries = '', i = 'flvplayer_container'; break; } case /live2\.nicovideo\.jp\/watch/.test(L): { @@ -26,21 +26,21 @@ b1 = p.replace(/.*?"(beginTime)".+?"(\d+)".*/,'&$1=$2'), b2 = p.replace(/.*?"(broadcastId)".+?"(\d+)".*/,'&$1=$2'), w = '&webSocketUrl=ws://a.live2.nicovideo.jp/wsapi/v1/watch/', - sachiko = '<br><input type="button" value="Sachiko" onClick="window.open(\'http://nl.nimg.jp/public/relive/1.2.10/assets/web/r1/swfs/v1/AriesPlayer.swf?' + a + b1 + b2 + w + '\',\'_blank\',\'width=960,height=512\');var f = &quot;playerswf&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);">', + Aries = '<br><input type="button" value="Aries" onClick="window.open(\'http://nl.nimg.jp/public/relive/1.2.10/assets/web/r1/swfs/v1/AriesPlayer.swf?' + a + b1 + b2 + w + '\',\'_blank\',\'width=960,height=512\');var f = &quot;playerswf&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);">', i = 'playerswf'; break; } default: { var h = prompt('放送IDかURL', ''); if (h.match(/lv[0-9]+/)) { h = h.replace(/.+?(lv\d+).*/, '$1'), - sachiko = ''; + Aries = ''; } else { alert('放送IDが入ってないよ!\n' + h); return false; } break; }} - m.innerHTML = '<b>プレイヤー変更</b>' + sachiko + '<br><input type="button" value="QWatch" onClick="window.open(\'http://live.nicovideo.jp/nicoliveplayer.swf?v=' + h + '&languagecode=ja-jp\',\'_blank\',\'width=960,height=490\');var f = &quot;' + i + '&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);"><input type="button" value="ニコファーレ" onClick="window.open(\'http://live.nicovideo.jp/liveplayer_farre.swf?v=' + h + '\',\'_blank\',\'width=960,height=520\');var f = &quot;' + i + '&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);"><br><input type="button" value="原宿" onClick="window.open(\'http://live.nicovideo.jp/liveplayer.swf?v=' + h + '\',\'_blank\',\'width=950,height=520\');var f = &quot;' + i + '&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);"><input type="button" value="ページ更新" onClick="window.location.reload(true)"><br><b>放送主用</b><br><input type="button" value="配信ツール(β)" onClick="window.open(\'http://live.nicovideo.jp/nicolivebroadcaster.swf?dicfilename=NicoliveBroadcasterDictionaryJAJP.swf&v=' + h + '\',\'_blank\',\'width=900,height=250\')"><input type="button" value="放送情報" onClick="window.open(\'http://live.nicovideo.jp/editstream/' + h + '\',\'_blank\',\'width=960,height=600,scrollbars=1\')"><br><input type="button" value="配信ツール(原宿)" onClick="window.open(\'http://live.nicovideo.jp/utility_v1.swf?v=' + h + '\',\'_blank\',\'width=950,height=200\')"> <small><a href="http://nico.ms/ar303976" target="_blank" title="support">' + d + '</a><b><br>※配信ツール(β)はニコ電とセッションが使えません<br>※配信ツール(原宿)はセッションがないです<br>※かんたん配信タブは1番最初に操作したウィンドウの<br>配信ツール(β)でいじってください<br>※放送情報変更の反映は少し時間がかかります</b></small>'; + m.innerHTML = '<b>プレイヤー変更</b>' + Aries + '<br><input type="button" value="QWatch" onClick="window.open(\'http://live.nicovideo.jp/nicoliveplayer.swf?v=' + h + '&languagecode=ja-jp\',\'_blank\',\'width=960,height=490\');var f = &quot;' + i + '&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);"><input type="button" value="ニコファーレ" onClick="window.open(\'http://live.nicovideo.jp/liveplayer_farre.swf?v=' + h + '\',\'_blank\',\'width=960,height=520\');var f = &quot;' + i + '&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);"><br><input type="button" value="原宿" onClick="window.open(\'http://live.nicovideo.jp/liveplayer.swf?v=' + h + '\',\'_blank\',\'width=950,height=520\');var f = &quot;' + i + '&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);"><input type="button" value="ページ更新" onClick="window.location.reload(true)"><br><b>放送主用</b><br><input type="button" value="配信ツール(β)" onClick="window.open(\'http://live.nicovideo.jp/nicolivebroadcaster.swf?dicfilename=NicoliveBroadcasterDictionaryJAJP.swf&v=' + h + '\',\'_blank\',\'width=900,height=250\')"><input type="button" value="放送情報" onClick="window.open(\'http://live.nicovideo.jp/editstream/' + h + '\',\'_blank\',\'width=960,height=600,scrollbars=1\')"><br><input type="button" value="配信ツール(原宿)" onClick="window.open(\'http://live.nicovideo.jp/utility_v1.swf?v=' + h + '\',\'_blank\',\'width=950,height=200\')"> <small><a href="http://nico.ms/ar303976" target="_blank" title="support">' + d + '</a><b><br>※配信ツール(β)はニコ電とセッションが使えません<br>※配信ツール(原宿)はセッションがないです<br>※かんたん配信タブは1番最初に操作したウィンドウの<br>配信ツール(β)でいじってください<br>※放送情報変更の反映は少し時間がかかります</b></small>'; m.style.color = 'rgb(250,250,250)'; m.style.textAlign = 'center'; m.style.padding = '10px';
  • /* @title nicoLivew
     * @description ニコニコ生放送のプレイヤーだけ抜き出したりとかする
     * @description http://ch.nicovideo.jp/star/blomaga/ar303976
     * @license MIT License
     */
     
    
    javascript:!function() {
    	var L = document.location.href,
    		m = document.createElement('div'),
    		d = 'v20131231';
    	switch (true) {
    	case /live\.nicovideo\.jp\/watch/.test(L): {
    		var h = document.documentElement.innerHTML,
    		h = h.replace(/(\n|\t)/g, ''),
    		h = h.replace(/.+meta.+?url.+?content.+?watch\/(lv[0-9]{5,}).*/, '$1'),
    		Aries = '',
    		i = 'flvplayer_container';
    		break;
    	} case /live2\.nicovideo\.jp\/watch/.test(L): {
    		var h = L.replace(/.*?watch\/(lv\d+).*/, '$1'),
    			s = document.getElementsByTagName('script'),
    			p0 = s[14].innerHTML,
    			p = p0.replace(/[\s|\u2028|\u2029]/g,'')
    			a = p.replace(/.*?"(audienceToken)".+?"(\w+)".*/,'$1=$2'),
    			b1 = p.replace(/.*?"(beginTime)".+?"(\d+)".*/,'&$1=$2'),
    			b2 = p.replace(/.*?"(broadcastId)".+?"(\d+)".*/,'&$1=$2'),
    			w = '&webSocketUrl=ws://a.live2.nicovideo.jp/wsapi/v1/watch/',
    			Aries = '<br><input type="button" value="Aries" onClick="window.open(\'http://nl.nimg.jp/public/relive/1.2.10/assets/web/r1/swfs/v1/AriesPlayer.swf?' + a + b1 + b2 + w + '\',\'_blank\',\'width=960,height=512\');var f = &quot;playerswf&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);">',
    			i = 'playerswf';
    		break;
    	} default: {
    		var h = prompt('放送IDかURL', '');
    		if (h.match(/lv[0-9]+/)) {
    			h = h.replace(/.+?(lv\d+).*/, '$1'),
    			Aries = '';
    		} else {
    			alert('放送IDが入ってないよ!\n' + h);
    			return false;
    		}
    		break;
    	}}
    			m.innerHTML = '<b>プレイヤー変更</b>' + Aries + '<br><input type="button" value="QWatch" onClick="window.open(\'http://live.nicovideo.jp/nicoliveplayer.swf?v=' + h + '&languagecode=ja-jp\',\'_blank\',\'width=960,height=490\');var f = &quot;' + i + '&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);"><input type="button" value="ニコファーレ" onClick="window.open(\'http://live.nicovideo.jp/liveplayer_farre.swf?v=' + h + '\',\'_blank\',\'width=960,height=520\');var f = &quot;' + i + '&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);"><br><input type="button" value="原宿" onClick="window.open(\'http://live.nicovideo.jp/liveplayer.swf?v=' + h + '\',\'_blank\',\'width=950,height=520\');var f = &quot;' + i + '&quot;,flv = document.getElementById(f);flv.parentNode.removeChild(flv);"><input type="button" value="ページ更新" onClick="window.location.reload(true)"><br><b>放送主用</b><br><input type="button" value="配信ツール(β)" onClick="window.open(\'http://live.nicovideo.jp/nicolivebroadcaster.swf?dicfilename=NicoliveBroadcasterDictionaryJAJP.swf&v=' + h + '\',\'_blank\',\'width=900,height=250\')"><input type="button" value="放送情報" onClick="window.open(\'http://live.nicovideo.jp/editstream/' + h + '\',\'_blank\',\'width=960,height=600,scrollbars=1\')"><br><input type="button" value="配信ツール(原宿)" onClick="window.open(\'http://live.nicovideo.jp/utility_v1.swf?v=' + h + '\',\'_blank\',\'width=950,height=200\')"> <small><a href="http://nico.ms/ar303976" target="_blank" title="support">' + d + '</a><b><br>※配信ツール(β)はニコ電とセッションが使えません<br>※配信ツール(原宿)はセッションがないです<br>※かんたん配信タブは1番最初に操作したウィンドウの<br>配信ツール(β)でいじってください<br>※放送情報変更の反映は少し時間がかかります</b></small>';
    		m.style.color = 'rgb(250,250,250)';
    		m.style.textAlign = 'center';
    		m.style.padding = '10px';
    		m.style.position = 'fixed';
    		m.style.zIndex = '9999';
    		m.style.fontSize = '12px';
    		m.style.border = '2px solid black';
    		m.style.right = '20px';
    		m.style.bottom = '20px';
    		m.style.background = 'rgba(0,128,255,0.5)';
    		document.body.appendChild(m);
    }();
  • Permalink
    このページへの個別リンクです。
    RAW
    書かれたコードへの直接のリンクです。
    Packed
    文字列が圧縮された書かれたコードへのリンクです。
    Userscript
    Greasemonkey 等で利用する場合の .user.js へのリンクです。
    Loader
    @require やソースコードが長い場合に多段ロードする Loader コミのコードへのリンクです。
    Metadata
    コード中にコメントで @xxx と書かれたメタデータの JSON です。

History

  1. 2018/02/19 21:59:39 - 2018-02-19
  2. 2018/02/19 21:08:46 - 2018-02-19
  3. 2016/09/01 19:38:21 - 2016-09-01
  4. 2016/02/19 02:35:21 - 2016-02-19
  5. 2016/02/19 02:28:03 - 2016-02-19
  6. 2016/01/31 19:39:17 - 2016-01-31
  7. 2016/01/31 18:36:20 - 2016-01-31
  8. 2016/01/31 18:28:30 - 2016-01-31
  9. 2015/09/12 01:54:26 - 2015-09-12
  10. 2015/09/12 01:53:32 - 2015-09-12
  11. 2015/09/12 01:35:59 - 2015-09-12
  12. 2015/09/12 01:32:46 - 2015-09-12
  13. 2014/12/31 19:21:09 - 2014-12-31
  14. 2014/12/31 18:29:53 - 2014-12-31
  15. 2014/02/25 04:12:50 - 2014-02-25
  16. 2014/01/12 16:41:03 - 2014-01-12
  17. 2014/01/12 16:36:03 - 2014-01-12
  18. 2014/01/01 17:22:45 - 2014-01-01
  19. 2014/01/01 02:23:22 - 2014-01-01
  20. 2014/01/01 00:52:27 - 2014-01-01
  21. 2013/12/31 22:28:27 - 2013-12-31
  22. 2013/12/31 21:49:11 - 2013-12-31
  23. 2013/12/31 16:51:42 - 2013-12-31
  24. 2013/12/31 16:51:27 - 2013-12-31
  25. 2013/12/31 16:44:14 - 2013-12-31
  26. 2013/12/31 16:43:37 - 2013-12-31
  27. 2013/09/13 21:16:17 - 2013-09-13
  28. 2013/09/13 16:26:23 - 2013-09-13
  29. 2013/09/13 16:25:02 - 2013-09-13
  30. 2013/09/09 19:59:11 - 2013-09-09
  31. 2013/09/09 19:56:30 - 2013-09-09
  32. 2013/09/09 00:07:20 - 2013-09-09
  33. 2013/09/01 18:01:54 - 2013-09-01
  34. 2013/08/23 11:17:25 - 2013-08-23
  35. 2013/08/23 11:13:57 - 2013-08-23
  36. 2013/08/23 11:09:26 - 2013-08-23
  37. 2013/08/23 10:59:05 - 2013-08-23
  38. 2013/08/23 10:35:09 - 2013-08-23
  39. 2013/08/23 10:07:35 - 2013-08-23