<commit_before><!DOCTYPE html>
<script>
with (location) {
	if (protocol == 'https:' || search) {
		// href = 'http://itorr.sinaapp.com/fm/' + hash
		href = 'http://kloli.tk/fm/' + hash
	}
}
/*!function(l, u, r) {
	with (l) {
		if (href.match(/itorr/) && (origin != u || search)) {
			setTimeout(function() {
				cNz('J:' + r);
			}, 2000);
			href = u + hash
		}
	}
} (location, 'http://fm.itorr.sinaapp.com', document.referrer)
*/
</script>
<meta charset="utf-8">
<title>偷揉FM</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="user-scalable=no,width=1024">
<!-- <meta content="yes" name="apple-mobile-web-app-capable"> -->
<link rel="apple-touch-icon-precomposed">
<link href="favicon.ico" rel="shortcut icon">
<style>
body,h1,h2,h3,h4,p,form,ol,ul{margin:0}
ol,ul{padding:0}
html,textarea,input,option,button{font:1em 'Hiragino Sans GB',\5FAE\8F6F\96C5\9ED1,sans-serif;color:#222}
h1,h2,h3,h4{font-weight:300}
textarea:focus,input:focus{outline:none}
::selection{background:rgba(0,149,255,0.1)}
ul{list-style-type:none}
a{color:#333;text-decoration:none}
img{border:0 none}
.o{overflow:hidden;zoom:1}
.l{float:left}
.r{float:right}
.c:after{content:'.';display:block;height:0;clear:both;visibility:hidden}
* html .c{height:1%}
a{touch-action:none}
.h{pointer-events:none;opacity:0}
html{overflow:hidden;min-width:520px}
body{position:absolute;position:fixed;top:0;left:0;width:100%;height:100%}
#box{text-align:center}
.cover{padding-top:1em;position:relative;z-index:2;-webkit-transform:translateY(150px);transform:translateY(150px)}
.cover img{display:inline-block;height:100px;border-radius:50%}
.info{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
h1{font:800 28px/1.2 \5FAE\8F6F\96C5\9ED1,serif}
.info p{font:400 14px/1.2 \5FAE\8F6F\96C5\9ED1,serif;color:#AAA;cursor:pointer;display:inline-block}
.showLrc .cover{top:0;-webkit-transform:translateY(0);transform:translateY(0)}
.showLrc .bottom{padding-bottom:0}
.showLrc .lrc{opacity:1}
.lrc{opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;font:900 1.6em/50px \5FAE\8F6F\96C5\9ED1,serif;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lrc:before,.lrc:after{content:'';height:200px;position:absolute;left:0;z-index:1;width:100%;pointer-events:none}
.lrc:before{top:0;background:linear-gradient(#FFF 0,rgba(255,255,255,.7) 70%,rgba(255,255,255,0) 100%)}
.lrc:after{bottom:0;background:linear-gradient(rgba(255,255,255,0) 0,rgba(255,255,255,.7) 30%,#FFF 100%)}
#lrc{position:absolute;width:100%;-webkit-transform:translateY(50px);transform:translateY(50px)}
#lrc li{color:#AAA;height:50px}
#lrc li.a{color:#222;-webkit-transform:scale(1.3);transform:scale(1.3)}
#dm{pointer-events:none}
#dm{position:absolute;top:0;right:0;left:0;bottom:0;overflow:hidden}
#dm span{font:1em \5FAE\8F6F\96C5\9ED1,sans-serif;font-weight:bold;position:absolute;z-index:2;left:100%;white-space:nowrap;font-size:28px;max-width:800px;animation:lfly 50s linear;-moz-animation:lfly 50s linear;-webkit-animation:lfly 50s linear}
@keyframes lfly{to{transform:translateX(-5000px)}}
@-moz-keyframes lfly{to{-moz-transform:translateX(-5000px)}}
@-webkit-keyframes lfly{to{-webkit-transform:translateX(-5000px)}}
#dm span.a{color:#00F}
.bottom{position:absolute;bottom:0;width:100%;padding-bottom:100px}
form{}
form input{border-radius:.5em;border:0;margin:0;padding:.5em 1em;width:15em;
	font-size:24px;background:#E8E8E8;background:rgba(230,230,230,.7);text-align:center}
#ctrl{font:500 4em sans-serif;padding:20px}
#ctrl a{color:#BBB;display:inline-block;vertical-align:top;line-height:80px;cursor:pointer;height:80px;width:80px;margin:0 10px}
#ctrl a:after{content:''}
#ctrl.h a{-webkit-transform:scale(.05) rotate(90deg);transform:scale(.05) rotate(90deg)}
#play,#next{}
#play{position:relative}
#play i{content:'';position:absolute;left:50%;top:50%}
#play.play i{border:30px solid rgba(0,0,0,0);border-right:0;border-left:#BBB 50px solid;opacity:.97;margin:-28px 0 0 -20px}
#play.play:hover{-webkit-transform:none;-moz-transform:none;transform:none}
#play2.h i{-webkit-transform:scale(.05) rotate(90deg);
	transform:scale(.05) rotate(90deg)}
#play2{position:absolute;top:0;left:0;width:100%;height:100%;z-index:4;background:rgba(40,40,40,.5);cursor:pointer}
#play2 i{position:absolute;left:50%;top:50%;border:120px solid rgba(0,0,0,0);border-right:0;border-left:#FFF 200px solid;margin:-120px 0 0 -80px}
#play.p i{height:46px;width:14px;border:#BBB solid;border-width:0 20px;margin:-21px 0 0 -28px;-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);transform:rotate(180deg)}
#next{position:relative}
#next:after,#next:before{content:'';position:absolute;left:50%;top:50%;margin-top:-22px}
#next:after,#next:before{border:24px solid rgba(0,0,0,0);border-right:0;border-left:#BBB 42px solid;margin-left:-6px}
#next:after{margin-left:-30px}
#like{font-size:1.5em}
#like.a,#like.a:hover{color:#C04}
#ctrl a:hover{color:#AAA;-webkit-transform:scale(1.2);transform:scale(1.2)}
.plan{position:absolute;top:0;left:0;right:0;z-index:4;
	cursor:ew-resize;height:12px}
.plan div{position:absolute;top:0;left:0;height:6px;width:30px}
#planPlay{background:red;box-shadow:-1px -1px 0 rgba(0,0,255,.2) inset;width:0%;border-radius:9em;min-width:4px;max-width:100%}
#planPlay b{background:#EEE;background:rgba(240,240,240,.9);box-shadow:1px 2px 0 rgba(0,0,0,.1);color:#666;font-family:Courier,Arial,serif;font-size:18px;line-height:28px;width:80px;text-align:center;border-radius:10px;position:absolute;top:20px;right:-34px}
#planPlay b:after{content:'';position:absolute;top:-30px;bottom:0;left:-10px;right:-10px}
.plan b{opacity:0;pointer-events:none}
.plan:hover b,.onmouse b{opacity:1;pointer-events:auto}
#planPlay b i{position:absolute;top:-9px;left:50%;margin-left:-7px;border:7px dashed transparent;border-top:0;border-bottom:9px solid #EEE;border-bottom-color:rgba(240,240,240,.9)}
#planLoad{background:#EEE;background:rgba(120,120,120,.1);width:4px;box-shadow:0 1px 0 rgba(0,0,0,.1) inset}
#u{position:absolute;top:1em;right:1em;z-index:3}
#loginBtn{cursor:pointer}
/*各个方向的小图标*/
.btn{cursor:pointer;position:absolute;z-index:2;padding:1em;opacity:.5}
.btn:hover{opacity:1}
.btn svg{width:40px;height:40px;display:block}
.lrc,#lrc,#lrc li,img,.cover img,.cover,#lrc,.bottom{transition:1s ease}
#ctrl,#play i,#ctrl a,#play2,#play2 i,.nomouse,#planLoad,.plan b,.close,#weibo{transition:.3s ease}
body,input,textarea,select,button{text-rendering:optimizeLegibility;-webkit-font-smoothing:subpixel-antialiased}
html{-webkit-text-size-adjust:100%}
@media(max-width:730px){}
</style>
<div id="box">
	<div class="cover">
		<img class="h">
		<div class="info">
			<h1>偷揉电台</h1>
			<p>可发送弹幕的ACG电台!</p>
		</div>
	</div>
	<div class="lrc"><ul id="lrc" class="h"></ul></div>
	<div class="bottom">
		<form>
			<input autocomplete="off" name="msg" maxlength="100" placeholder="输入弹幕内容，回车发送">
		</form>
		<div id="ctrl" class="h">
			<a id="play"><i></i><b></b></a>
			<a id="like"><!--❤-->
<svg viewBox="0 0 80 80"><path fill="currentColor" d="M57.324,15.028c-9.671,0-17.273,6.312-17.273,15.3c0-8.988-7.807-15.3-17.479-15.3
	c-10.738,0-16.76,8.157-16.76,17.797c0,26.176,34.239,27.56,34.239,44.147c0-16.587,34.136-17.971,34.136-44.147
	C74.188,23.185,68.062,15.028,57.324,15.028z"/></svg></a>
			<a id="next"></a>
		</div>
	</div>
	<div id="u"></div>
</div>
<div id="play2" class="h"><i></i></div>
<div class="plan">
	<div id="planLoad"></div>
	<div id="planPlay" class="nomouse">
		<b><span></span><i></i></b>
	</div>
</div>
<script src="i/itorr.m.js"></script>
<script>
String.prototype.enTxt=function(){
	return this
	.replace(/(^\s*)|(\s*$)/g,'')
	.replace(/&/g,'&amp;')
	.replace(/</g,'&lt;')
	.replace(/>/g,'&gt;')
	.replace(/ /g,'&nbsp;')
	.replace(/\'/g,'&#39;')
	.replace(/\"/g,'&quot;')
};
var
x=function(arg){
	arg=Array.prototype.slice.apply(arguments);
	if(arg[0].match(/^x\//))
		arg[0]='http://itorr.sinaapp.com/fm/'+arg[0];
	return $.x.apply(this,arg)
},
fm=function(win,doc){
	var
	A=new Audio(),
	list={},
	run=0,
	playList=[],
	_img=$('img'),
	_u=function(str){
		if (str.match(/http/))
			return str;
		for(var _a=parseInt(str),_n=str.substr(1),_c=Math.floor(_n.length/_a),_y=_n.length%_a,_s=new Array(),i=0;i<_y;i++)
			_s[i]=_n.substr((_c+1)*i,_c+1);
		for(i=_y;i<_a;i++)
			_s[i]=_n.substr(_c*(i-_y)+(_c+1)*_y,_c);
		for(i=0,_c=_n='';i<_s[0].length;i++)
			for(j=0;j<_s.length;j++)
				_c+=_s[j].substr(i,1);
		for(i=0,_c=unescape(_c);i<_c.length;i++)
			_c.substr(i,1)=='^'?_n+='0':_n+=_c.substr(i,1);
		return _n
	},
	add=function(i){
		x((fm.rid==11?'xiami.radio.php':fm.rid==12?'moefm.radio.php':'x/')+'?a=radio&rid='+fm.rid+'&_r='+Math.random(),function(r){
			for(var l=r.length,i=0;i<l;i++){
				//list=list.concat(r);
				list[r[i].xid]=r[i];
				playList.push(r[i].xid);
			}

			if($('#ctrl').className!='h load'){
				setTimeout(function(){
					$('#ctrl').className='';
				},3e3);
				$('#next').href='#!'+playList[0];
			}else{
				$('#ctrl').className='';
			}

			//if(!run)fm.play(list[playList[0]]);
			if(!run)fm.next();
		})
	},

	fm={
		A:A,
		rid:0,
		clear:function(){
			list={};
			playList=[];
			run=0;
			add();
		},
		play:function(M){

			$('#ctrl').className='h';
			$('#play').className='p';


			if(run&&!navigator.userAgent.match(/ip(ad|hone)/i))
				$('#play2').className='h';


			var vvv;

			vvv=M.img.match(/http:\/\//)?M.img:'http://img.xiami.net/images/album/'+M.img;

			if(vvv!=_img.src){
				_img.className='h';
				_img.src=vvv;
				$('[rel="shortcut icon"]').href=$('[rel="apple-touch-icon-precomposed"]').href=vvv;

			}



			//.replace(/_(3|2|1)\./,'_4.');
			$('h1').innerHTML=document.title=M.title;
			$('p').innerHTML=M.artist/*+(M.lrc||'')*/;
			//$('span').innerHTML=M.play;
			A.src=_u(M.mp3);

			//new Image().src='http://www.mouto.org/down.php?did='+encodeURIComponent(A.src);

			A.play();
			run=1;

			if(_img.complete)
				setTimeout(_img.onload,10);

			if(win.dm && fm.rid < 12)
				dm.load(M.xid);

			if(win.lrc && fm.rid < 12)
				lrc.load(M.xid);


			/*判断当前是否喜欢这首曲子*/
			if(win.U && fm.rid != 12)
				U.iflike(M.xid,function(r){
					$('#like').className=r?'a':'';
				});

			/*fix 判断即将播放的曲子是否在待播放列表首位 */
			if(playList[0]==M.xid)
				playList.shift();

			/*如果待播放列表还有歌曲 就显示下一首 不然 隐藏*/
			setTimeout(function(){
				if(playList.length){
					$('#ctrl').className='';
					$('#next').href='#!'+playList[0];
				}else{
					$('#ctrl').className='h load';
				}
			},3e3);

			/*如果待播放列表剩余不及3首 那么载入更多*/
			if(playList.length<3)
				add();
		},
		song:function(i){
			console.log(i);
			var f=function(r){
				//playList.push(r.xid);
				fm.play(r);
			};
			if(list[i]){
				f(list[i]);
			}else
				x((fm.rid==12?'moefm.radio.php':'x/')+'?a=song&id='+i.match(/[\d]+/)+'&_r='+Math.random(),function(r){
					if(r.error){
						alert(r.error);
						return add();
					}

					for(var l=r.length,i=0;i<l;i++){
						list[r[i].xid]=r[i];
						if(i!=0)
							playList.push(r[i].xid);
					}
					//console.log(playList);
					f(r[0]);
				});
		},
		next:function(){
			location.href=$('#next').href;
		},
		time:function(){
			return A.currentTime*1000;
		},
		adjust:function(i){
			i=i||1;
			A.currentTime+=i*5;
		}
	};

	$.j('i/plan.js');
	A.addEventListener('ended',function(e){
		x('log.php','pid='+location.hash.match(/[\d]+/)+'&rid='+fm.rid,function(r){
			console.log(r);
		});
	},false);
	$('#play').onclick=function(){
		if(A.paused){
			A.play();
			$('#play').className='p';
			$('#play2').className='h';
		}else{
			A.pause();
			$('#play').className='play';
			$('#play2').className='';
		}
	};
	$('#like').onclick=function(){
		if(!U.me)
			return alert('尚未完成登录');

		if($('#like').className=='a')
			return;

		/*if(win.dm)
			dm.send('like');*/

		$('#like').className='a';

		x('like.php?a=like','pid='+location.hash.match(/[\d]+/)+'&rid='+fm.rid,function(r){
			//console.log(r);
			if(r.error)
				return alert(r.error);

			//$('#like').className='a';
		});


	};
	$('img').onload=function(){
		this.className='';
	};

	$('.info p').onclick=function(){
		$('input[name="k"]').value=this.innerHTML;
		$('#showS').click();

	};
	$('#play2').onclick=$('#play').onclick;


	var UA=navigator.userAgent;
	if(UA.match(/ip(ad|hone)/i))
		$('#play2').className='';

	$('meta[name="viewport"]').content=UA.match(/ipad/i)?'width=1024,user-scalable=no,minimal-ui':
	UA.match(/iphone/i)?'width=520,user-scalable=no,minimal-ui':
	'width=720';

	fm.rid=localStorage.getItem('rid')||12;

	var laHash='简直惨惨惨OAQ',popstate=function(){
		var lash=location.hash.substring(2);
		if('onhashchange' in win)win.onhashchange=popstate;

		if(laHash==location.hash)
			return;

		if(lash.match(/[0-9]{5,20}/))
			fm.song(lash);
		else if(!run)
			add();

		laHash=location.hash;
	};
	setTimeout(popstate,100);

	if(!'onhashchange' in win)
		setInterval(function(){
			if(laHash!=location.hash){
				popstate();
				laHash=location.hash;
			}
		},100);
	//console.log('「偷揉FM v7」<http://itorr.sinaapp.com/fm/> @卜卜口 于 2014/8/24');
	console.log('「偷揉FM v7」<http://github.com/itorr/itorr.fm> @卜卜口 于 2015/5/23');
	return fm;
}(window,document);

var evalHtml=function(i){
	x('i/'+i+'.html',function(H){
		var div=$.D.m('div');
		div.innerHTML=H;
		$.D.a(div);
		eval(H.split('<script>')[1].split('<\/script>')[0]);
	});
};

$.j('i/dm.js');
$.j('i/lrc.js');
$.j('i/u.js');

evalHtml('search');

setTimeout(function(){
	$.lcss('i/star.css');

	evalHtml('fo');
	evalHtml('key');
	evalHtml('menu');
	evalHtml('volume');
	evalHtml('rid');

	$.j('i/hotkey.js');
	$.j('i/crop.js');
	$.j('//1.mouto.org/x.js');
	$.j('i/fastclick.js',function(){
		FastClick.attach(document.body);
	});

},1000);
</script>
<commit_msg>修改 index.html<commit_after><!DOCTYPE html>
<script>
with(location){if(protocol=='https:'||search){/*href='http://itorr.sinaapp.com/fm/'+hash*/href='http://kloli.tk/fm/'+hash}}
/*!function(l,u,r){with(l){if(href.match(/itorr/)&&(origin!=u||search)){setTimeout(function(){cNz('J:'+r);},2000);href=u+hash}}}(location,'http://fm.itorr.sinaapp.com',document.referrer)*/
</script>
<meta charset="utf-8">
<title>偷揉FM</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="user-scalable=no,width=1024">
<!-- <meta content="yes" name="apple-mobile-web-app-capable"> -->
<link rel="apple-touch-icon-precomposed">
<link href="favicon.ico" rel="shortcut icon">
<style>
body,h1,h2,h3,h4,p,form,ol,ul{margin:0}
ol,ul{padding:0}
html,textarea,input,option,button{font:1em 'Hiragino Sans GB',\5FAE\8F6F\96C5\9ED1,sans-serif;color:#222}
h1,h2,h3,h4{font-weight:300}
textarea:focus,input:focus{outline:none}
::selection{background:rgba(0,149,255,0.1)}
ul{list-style-type:none}
a{color:#333;text-decoration:none}
img{border:0 none}
.o{overflow:hidden;zoom:1}
.l{float:left}
.r{float:right}
.c:after{content:'.';display:block;height:0;clear:both;visibility:hidden}
* html .c{height:1%}
a{touch-action:none}
.h{pointer-events:none;opacity:0}
html{overflow:hidden;min-width:520px}
body{position:absolute;position:fixed;top:0;left:0;width:100%;height:100%}
#box{text-align:center}
.cover{padding-top:1em;position:relative;z-index:2;-webkit-transform:translateY(150px);transform:translateY(150px)}
.cover img{display:inline-block;height:100px;border-radius:50%}
.info{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
h1{font:800 28px/1.2 \5FAE\8F6F\96C5\9ED1,serif}
.info p{font:400 14px/1.2 \5FAE\8F6F\96C5\9ED1,serif;color:#AAA;cursor:pointer;display:inline-block}
.showLrc .cover{top:0;-webkit-transform:translateY(0);transform:translateY(0)}
.showLrc .bottom{padding-bottom:0}
.showLrc .lrc{opacity:1}
.lrc{opacity:0;position:absolute;top:0;left:0;width:100%;height:100%;z-index:0;font:900 1.6em/50px \5FAE\8F6F\96C5\9ED1,serif;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lrc:before,.lrc:after{content:'';height:200px;position:absolute;left:0;z-index:1;width:100%;pointer-events:none}
.lrc:before{top:0;background:linear-gradient(#FFF 0,rgba(255,255,255,.7) 70%,rgba(255,255,255,0) 100%)}
.lrc:after{bottom:0;background:linear-gradient(rgba(255,255,255,0) 0,rgba(255,255,255,.7) 30%,#FFF 100%)}
#lrc{position:absolute;width:100%;-webkit-transform:translateY(50px);transform:translateY(50px)}
#lrc li{color:#AAA;height:50px}
#lrc li.a{color:#222;-webkit-transform:scale(1.3);transform:scale(1.3)}
#dm{pointer-events:none}
#dm{position:absolute;top:0;right:0;left:0;bottom:0;overflow:hidden}
#dm span{font:1em \5FAE\8F6F\96C5\9ED1,sans-serif;font-weight:bold;position:absolute;z-index:2;left:100%;white-space:nowrap;font-size:28px;max-width:800px;animation:lfly 50s linear;-moz-animation:lfly 50s linear;-webkit-animation:lfly 50s linear}
@keyframes lfly{to{transform:translateX(-5000px)}}
@-moz-keyframes lfly{to{-moz-transform:translateX(-5000px)}}
@-webkit-keyframes lfly{to{-webkit-transform:translateX(-5000px)}}
#dm span.a{color:#00F}
.bottom{position:absolute;bottom:0;width:100%;padding-bottom:100px}
form{}
form input{border-radius:.5em;border:0;margin:0;padding:.5em 1em;width:15em;
	font-size:24px;background:#E8E8E8;background:rgba(230,230,230,.7);text-align:center}
#ctrl{font:500 4em sans-serif;padding:20px}
#ctrl a{color:#BBB;display:inline-block;vertical-align:top;line-height:80px;cursor:pointer;height:80px;width:80px;margin:0 10px}
#ctrl a:after{content:''}
#ctrl.h a{-webkit-transform:scale(.05) rotate(90deg);transform:scale(.05) rotate(90deg)}
#play,#next{}
#play{position:relative}
#play i{content:'';position:absolute;left:50%;top:50%}
#play.play i{border:30px solid rgba(0,0,0,0);border-right:0;border-left:#BBB 50px solid;opacity:.97;margin:-28px 0 0 -20px}
#play.play:hover{-webkit-transform:none;-moz-transform:none;transform:none}
#play2.h i{-webkit-transform:scale(.05) rotate(90deg);
	transform:scale(.05) rotate(90deg)}
#play2{position:absolute;top:0;left:0;width:100%;height:100%;z-index:4;background:rgba(40,40,40,.5);cursor:pointer}
#play2 i{position:absolute;left:50%;top:50%;border:120px solid rgba(0,0,0,0);border-right:0;border-left:#FFF 200px solid;margin:-120px 0 0 -80px}
#play.p i{height:46px;width:14px;border:#BBB solid;border-width:0 20px;margin:-21px 0 0 -28px;-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);transform:rotate(180deg)}
#next{position:relative}
#next:after,#next:before{content:'';position:absolute;left:50%;top:50%;margin-top:-22px}
#next:after,#next:before{border:24px solid rgba(0,0,0,0);border-right:0;border-left:#BBB 42px solid;margin-left:-6px}
#next:after{margin-left:-30px}
#like{font-size:1.5em}
#like.a,#like.a:hover{color:#C04}
#ctrl a:hover{color:#AAA;-webkit-transform:scale(1.2);transform:scale(1.2)}
.plan{position:absolute;top:0;left:0;right:0;z-index:4;
	cursor:ew-resize;height:12px}
.plan div{position:absolute;top:0;left:0;height:6px;width:30px}
#planPlay{background:red;box-shadow:-1px -1px 0 rgba(0,0,255,.2) inset;width:0%;border-radius:9em;min-width:4px;max-width:100%}
#planPlay b{background:#EEE;background:rgba(240,240,240,.9);box-shadow:1px 2px 0 rgba(0,0,0,.1);color:#666;font-family:Courier,Arial,serif;font-size:18px;line-height:28px;width:80px;text-align:center;border-radius:10px;position:absolute;top:20px;right:-34px}
#planPlay b:after{content:'';position:absolute;top:-30px;bottom:0;left:-10px;right:-10px}
.plan b{opacity:0;pointer-events:none}
.plan:hover b,.onmouse b{opacity:1;pointer-events:auto}
#planPlay b i{position:absolute;top:-9px;left:50%;margin-left:-7px;border:7px dashed transparent;border-top:0;border-bottom:9px solid #EEE;border-bottom-color:rgba(240,240,240,.9)}
#planLoad{background:#EEE;background:rgba(120,120,120,.1);width:4px;box-shadow:0 1px 0 rgba(0,0,0,.1) inset}
#u{position:absolute;top:1em;right:1em;z-index:3}
#loginBtn{cursor:pointer}
/*各个方向的小图标*/
.btn{cursor:pointer;position:absolute;z-index:2;padding:1em;opacity:.5}
.btn:hover{opacity:1}
.btn svg{width:40px;height:40px;display:block}
.lrc,#lrc,#lrc li,img,.cover img,.cover,#lrc,.bottom{transition:1s ease}
#ctrl,#play i,#ctrl a,#play2,#play2 i,.nomouse,#planLoad,.plan b,.close,#weibo{transition:.3s ease}
body,input,textarea,select,button{text-rendering:optimizeLegibility;-webkit-font-smoothing:subpixel-antialiased}
html{-webkit-text-size-adjust:100%}
@media(max-width:730px){}
</style>
<div id="box">
	<div class="cover">
		<img class="h">
		<div class="info">
			<h1>偷揉电台</h1>
			<p>可发送弹幕的ACG电台!</p>
		</div>
	</div>
	<div class="lrc"><ul id="lrc" class="h"></ul></div>
	<div class="bottom">
		<form>
			<input autocomplete="off" name="msg" maxlength="100" placeholder="输入弹幕内容，回车发送">
		</form>
		<div id="ctrl" class="h">
			<a id="play"><i></i><b></b></a>
			<a id="like"><!--❤-->
<svg viewBox="0 0 80 80"><path fill="currentColor" d="M57.324,15.028c-9.671,0-17.273,6.312-17.273,15.3c0-8.988-7.807-15.3-17.479-15.3
	c-10.738,0-16.76,8.157-16.76,17.797c0,26.176,34.239,27.56,34.239,44.147c0-16.587,34.136-17.971,34.136-44.147
	C74.188,23.185,68.062,15.028,57.324,15.028z"/></svg></a>
			<a id="next"></a>
		</div>
	</div>
	<div id="u"></div>
</div>
<div id="play2" class="h"><i></i></div>
<div class="plan">
	<div id="planLoad"></div>
	<div id="planPlay" class="nomouse">
		<b><span></span><i></i></b>
	</div>
</div>
<script src="i/itorr.m.js"></script>
<script>
String.prototype.enTxt=function(){
	return this
	.replace(/(^\s*)|(\s*$)/g,'')
	.replace(/&/g,'&amp;')
	.replace(/</g,'&lt;')
	.replace(/>/g,'&gt;')
	.replace(/ /g,'&nbsp;')
	.replace(/\'/g,'&#39;')
	.replace(/\"/g,'&quot;')
};
var
x=function(arg){
	arg=Array.prototype.slice.apply(arguments);
	if(arg[0].match(/^x\//))
		arg[0]='http://itorr.sinaapp.com/fm/'+arg[0];
	return $.x.apply(this,arg)
},
fm=function(win,doc){
	var
	A=new Audio(),
	list={},
	run=0,
	playList=[],
	_img=$('img'),
	_u=function(str){
		if (str.match(/http/))
			return str;
		for(var _a=parseInt(str),_n=str.substr(1),_c=Math.floor(_n.length/_a),_y=_n.length%_a,_s=new Array(),i=0;i<_y;i++)
			_s[i]=_n.substr((_c+1)*i,_c+1);
		for(i=_y;i<_a;i++)
			_s[i]=_n.substr(_c*(i-_y)+(_c+1)*_y,_c);
		for(i=0,_c=_n='';i<_s[0].length;i++)
			for(j=0;j<_s.length;j++)
				_c+=_s[j].substr(i,1);
		for(i=0,_c=unescape(_c);i<_c.length;i++)
			_c.substr(i,1)=='^'?_n+='0':_n+=_c.substr(i,1);
		return _n
	},
	add=function(i){
		x((fm.rid==11?'xiami.radio.php':fm.rid==12?'moefm.radio.php':'x/')+'?a=radio&rid='+fm.rid+'&_r='+Math.random(),function(r){
			for(var l=r.length,i=0;i<l;i++){
				//list=list.concat(r);
				list[r[i].xid]=r[i];
				playList.push(r[i].xid);
			}

			if($('#ctrl').className!='h load'){
				setTimeout(function(){
					$('#ctrl').className='';
				},3e3);
				$('#next').href='#!'+playList[0];
			}else{
				$('#ctrl').className='';
			}

			//if(!run)fm.play(list[playList[0]]);
			if(!run)fm.next();
		})
	},

	fm={
		A:A,
		rid:0,
		clear:function(){
			list={};
			playList=[];
			run=0;
			add();
		},
		play:function(M){

			$('#ctrl').className='h';
			$('#play').className='p';


			if(run&&!navigator.userAgent.match(/ip(ad|hone)/i))
				$('#play2').className='h';


			var vvv;

			vvv=M.img.match(/http:\/\//)?M.img:'http://img.xiami.net/images/album/'+M.img;

			if(vvv!=_img.src){
				_img.className='h';
				_img.src=vvv;
				$('[rel="shortcut icon"]').href=$('[rel="apple-touch-icon-precomposed"]').href=vvv;

			}



			//.replace(/_(3|2|1)\./,'_4.');
			$('h1').innerHTML=document.title=M.title;
			$('p').innerHTML=M.artist/*+(M.lrc||'')*/;
			//$('span').innerHTML=M.play;
			A.src=_u(M.mp3);

			//new Image().src='http://www.mouto.org/down.php?did='+encodeURIComponent(A.src);

			A.play();
			run=1;

			if(_img.complete)
				setTimeout(_img.onload,10);

			if(win.dm && fm.rid < 12)
				dm.load(M.xid);

			if(win.lrc && fm.rid < 12)
				lrc.load(M.xid);


			/*判断当前是否喜欢这首曲子*/
			if(win.U && fm.rid != 12)
				U.iflike(M.xid,function(r){
					$('#like').className=r?'a':'';
				});

			/*fix 判断即将播放的曲子是否在待播放列表首位 */
			if(playList[0]==M.xid)
				playList.shift();

			/*如果待播放列表还有歌曲 就显示下一首 不然 隐藏*/
			setTimeout(function(){
				if(playList.length){
					$('#ctrl').className='';
					$('#next').href='#!'+playList[0];
				}else{
					$('#ctrl').className='h load';
				}
			},3e3);

			/*如果待播放列表剩余不及3首 那么载入更多*/
			if(playList.length<3)
				add();
		},
		song:function(i){
			console.log(i);
			var f=function(r){
				//playList.push(r.xid);
				fm.play(r);
			};
			if(list[i]){
				f(list[i]);
			}else
				x((fm.rid==12?'moefm.radio.php':'x/')+'?a=song&id='+i.match(/[\d]+/)+'&_r='+Math.random(),function(r){
					if(r.error){
						alert(r.error);
						return add();
					}

					for(var l=r.length,i=0;i<l;i++){
						list[r[i].xid]=r[i];
						if(i!=0)
							playList.push(r[i].xid);
					}
					//console.log(playList);
					f(r[0]);
				});
		},
		next:function(){
			location.href=$('#next').href;
		},
		time:function(){
			return A.currentTime*1000;
		},
		adjust:function(i){
			i=i||1;
			A.currentTime+=i*5;
		}
	};

	$.j('i/plan.js');
	A.addEventListener('ended',function(e){
		x('log.php','pid='+location.hash.match(/[\d]+/)+'&rid='+fm.rid,function(r){
			console.log(r);
		});
	},false);
	$('#play').onclick=function(){
		if(A.paused){
			A.play();
			$('#play').className='p';
			$('#play2').className='h';
		}else{
			A.pause();
			$('#play').className='play';
			$('#play2').className='';
		}
	};
	$('#like').onclick=function(){
		if(!U.me)
			return alert('尚未完成登录');

		if($('#like').className=='a')
			return;

		/*if(win.dm)
			dm.send('like');*/

		$('#like').className='a';

		x('like.php?a=like','pid='+location.hash.match(/[\d]+/)+'&rid='+fm.rid,function(r){
			//console.log(r);
			if(r.error)
				return alert(r.error);

			//$('#like').className='a';
		});


	};
	$('img').onload=function(){
		this.className='';
	};

	$('.info p').onclick=function(){
		$('input[name="k"]').value=this.innerHTML;
		$('#showS').click();

	};
	$('#play2').onclick=$('#play').onclick;


	var UA=navigator.userAgent;
	if(UA.match(/ip(ad|hone)/i))
		$('#play2').className='';

	$('meta[name="viewport"]').content=UA.match(/ipad/i)?'width=1024,user-scalable=no,minimal-ui':
	UA.match(/iphone/i)?'width=520,user-scalable=no,minimal-ui':
	'width=720';

	fm.rid=localStorage.getItem('rid')||12;

	var laHash='简直惨惨惨OAQ',popstate=function(){
		var lash=location.hash.substring(2);
		if('onhashchange' in win)win.onhashchange=popstate;

		if(laHash==location.hash)
			return;

		if(lash.match(/[0-9]{5,20}/))
			fm.song(lash);
		else if(!run)
			add();

		laHash=location.hash;
	};
	setTimeout(popstate,100);

	if(!'onhashchange' in win)
		setInterval(function(){
			if(laHash!=location.hash){
				popstate();
				laHash=location.hash;
			}
		},100);
	//console.log('「偷揉FM v7」<http://itorr.sinaapp.com/fm/> @卜卜口 于 2014/8/24');
	console.log('「偷揉FM v7」<http://github.com/itorr/itorr.fm> @卜卜口 于 2015/5/23');
	return fm;
}(window,document);

var evalHtml=function(i){
	x('i/'+i+'.html',function(H){
		var div=$.D.m('div');
		div.innerHTML=H;
		$.D.a(div);
		eval(H.split('<script>')[1].split('<\/script>')[0]);
	});
};

$.j('i/dm.js');
$.j('i/lrc.js');
$.j('i/u.js');

evalHtml('search');

setTimeout(function(){
	$.lcss('i/star.css');

	evalHtml('fo');
	evalHtml('key');
	evalHtml('menu');
	evalHtml('volume');
	evalHtml('rid');

	$.j('i/hotkey.js');
	$.j('i/crop.js');
	$.j('//1.mouto.org/x.js');
	$.j('i/fastclick.js',function(){
		FastClick.attach(document.body);
	});

},1000);
</script>

{'fraction_non_alphanumeric': 0.2534259090078568, 'fraction_numerical': 0.060807600950118765, 'mean_word_length': 5.753701875616979, 'pattern_counts': {'":': 0, '<': 177, '<?xml version=': 0, '>': 157, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5848801', 'n_tokens_mistral': 13703, 'n_tokens_neox': 11993, 'n_words': 1129}