<commit_before>(function ($, imagesLoaded, TL, template, audiojs, cityJson) {

	var isProduction = false;

	var HONOR = {};
	window.HONOR = HONOR;

	HONOR.Config = {
		baseUrl: isProduction ? "http://campaign.honor.cn/planet/star" : "http://campaign.honor.cn/test/planet/star/pc",
		api: "http://campaign.honor.cn/awards-inform/star/src/save.php?action=",
		dataType: isProduction ? "json" : "jsonp"
	};

	HONOR.Public = (function(){

		var Sys = {};
		var ua = navigator.userAgent.toLowerCase();
		var s;
		(s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] :
		(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
		(s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
		(s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
		(s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
		(s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;

		if (Sys.ie){
		    var isltIE8 = parseInt(Sys.ie) < 9 ? true : false;
		}
		
		return {
			isltIE8: isltIE8
		}
	})();

	// 入场动画
	HONOR.Landing = (function(){

		var text = "他们有着独特的个性、出众的外表，拥有荣耀星人的特质，他们是我们的明星战队！在荣耀2周年狂欢Party现场，你们可以见到他们本人哦！让我们一起来猜一下，分别都有谁？",
			delay = 0,
			currentChar = 1;


		var ship = $('.panel'),
			dialog = $('.text-container'),
			preloadBox = $('#preload'),
			percentBox = $("#percentage"),
			UFO = $('#ufo');

		var preloadData = {
			imgs:[
				"astronaut-5th-shadow.png",
				"astronaut-5th.png",
				"astronaut-first.png",
				"astronaut-last-dialog.png",
				"astronaut-last.png",
				"bg.jpg",
				"box-exam.png",
				"box-result.png",
				"box-txt.png",
				"btn-wrap.png",
				"lightning.png",
				"line.png",
				"logo.png",
				"panel-status-default.png",
				"panel-status-progress.png",
				"planet-1.png",
				"planet-2.png",
				"planet-3.png",
				"planet-4.png",
				"planet-5.png",
				"radar-alert.png",
				"radar.png",
				"ship.png",
				"sqr-txt.png",
				"star-1.png",
				"star-2.png",
				"star-3.png",
				"star-bg.png",
				"ufo.png",
				"wormhole.png"
			]
		};

		var init = function(){
			// 渲染加载模版
			var imgHTML = template("loadImgBox", preloadData);
			preloadBox.html(imgHTML);

			var imgs = preloadBox.find('img'),
				allimg_count = imgs.length,
				img_count = 0;

			imgs.each(function(){
				$(this).imagesLoaded(function(){
					img_count++;
					var percentage = Math.floor((img_count/allimg_count)*100);
					percentBox.html(percentage+"%");
					if(img_count == allimg_count){
						// UFO升顶
						TL.to(UFO, 0.8, {left: "45%", top: "-10%", onComplete: completeLoadingHandler})
						if(HONOR.Public.isltIE8){
							$('.planets').hide();
						}
					}
				});
			});

			// showShip();
			startTyping(text, 50, "test");

			// 初始化音频
			audiojs.events.ready(function() {
				var as = audiojs.createAll();
			});
		};

		var completeLoadingHandler = function(){
			// 移除loading
			$('#loading').fadeOut(100,function(){
				$(this).remove();
				// UFO浪
				randomUFO();
				// 如是登录回调且已答过题
				if(window.location.href.indexOf('showResult') > -1){
					HONOR.Result.init();
					HONOR.Result.requestResult();
				}
			});
		};

		var type = function(){
			var dest=document.getElementById(destination);
			if (dest)
			{
				dest.innerHTML=text.substr(0, currentChar)+"_";
				currentChar++;
				if (currentChar<=text.length)
				{
					setTimeout(type, delay);
				}else{
					// 停顿1s执行
					setTimeout(function(){
						// 隐藏对话框
						TL.to(dialog, 0.8, {y: -100,alpha: 0})
						setTimeout(function(){
							// 显示星球
							showPlanet();	
						},800)
					},1000)<commit_msg>ie8禁止ufo飞行<commit_after>(function ($, imagesLoaded, TL, template, audiojs, cityJson) {

	var isProduction = false;

	var HONOR = {};
	window.HONOR = HONOR;

	HONOR.Config = {
		baseUrl: isProduction ? "http://campaign.honor.cn/planet/star" : "http://campaign.honor.cn/test/planet/star/pc",
		api: "http://campaign.honor.cn/awards-inform/star/src/save.php?action=",
		dataType: isProduction ? "json" : "jsonp"
	};

	HONOR.Public = (function(){

		var Sys = {};
		var ua = navigator.userAgent.toLowerCase();
		var s;
		(s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] :
		(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
		(s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
		(s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
		(s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
		(s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;

		if (Sys.ie){
		    var isltIE8 = parseInt(Sys.ie) < 9 ? true : false;
		}
		
		return {
			isltIE8: isltIE8
		}
	})();

	// 入场动画
	HONOR.Landing = (function(){

		var text = "他们有着独特的个性、出众的外表，拥有荣耀星人的特质，他们是我们的明星战队！在荣耀2周年狂欢Party现场，你们可以见到他们本人哦！让我们一起来猜一下，分别都有谁？",
			delay = 0,
			currentChar = 1;


		var ship = $('.panel'),
			dialog = $('.text-container'),
			preloadBox = $('#preload'),
			percentBox = $("#percentage"),
			UFO = $('#ufo');

		var preloadData = {
			imgs:[
				"astronaut-5th-shadow.png",
				"astronaut-5th.png",
				"astronaut-first.png",
				"astronaut-last-dialog.png",
				"astronaut-last.png",
				"bg.jpg",
				"box-exam.png",
				"box-result.png",
				"box-txt.png",
				"btn-wrap.png",
				"lightning.png",
				"line.png",
				"logo.png",
				"panel-status-default.png",
				"panel-status-progress.png",
				"planet-1.png",
				"planet-2.png",
				"planet-3.png",
				"planet-4.png",
				"planet-5.png",
				"radar-alert.png",
				"radar.png",
				"ship.png",
				"sqr-txt.png",
				"star-1.png",
				"star-2.png",
				"star-3.png",
				"star-bg.png",
				"ufo.png",
				"wormhole.png"
			]
		};

		var init = function(){
			// 渲染加载模版
			var imgHTML = template("loadImgBox", preloadData);
			preloadBox.html(imgHTML);

			var imgs = preloadBox.find('img'),
				allimg_count = imgs.length,
				img_count = 0;

			imgs.each(function(){
				$(this).imagesLoaded(function(){
					img_count++;
					var percentage = Math.floor((img_count/allimg_count)*100);
					percentBox.html(percentage+"%");
					if(img_count == allimg_count){
						// UFO升顶
						TL.to(UFO, 0.8, {left: "45%", top: "-10%", onComplete: completeLoadingHandler})
						if(HONOR.Public.isltIE8){
							$('.planets').hide();
						}
					}
				});
			});

			// showShip();
			startTyping(text, 50, "test");

			// 初始化音频
			audiojs.events.ready(function() {
				var as = audiojs.createAll();
			});
		};

		var completeLoadingHandler = function(){
			// 移除loading
			$('#loading').fadeOut(100,function(){
				$(this).remove();
				// UFO浪
				if(!HONOR.Public.isltIE8){
					randomUFO();
				}
				// 如是登录回调且已答过题
				if(window.location.href.indexOf('showResult') > -1){
					HONOR.Result.init();
					HONOR.Result.requestResult();
				}
			});
		};

		var type = function(){
			var dest=document.getElementById(destination);
			if (dest)
			{
				dest.innerHTML=text.substr(0, currentChar)+"_";
				currentChar++;
				if (currentChar<=text.length)
				{
					setTimeout(type, delay);
				}else{
					// 停顿1s执行
					setTimeout(function(){
						// 隐藏对话框
						TL.to(dialog, 0.8, {y: -100,alpha: 0})
						setTimeout(function(){
							// 显示星球
							showPlanet();	
						},800)
					},1000)
{'fraction_non_alphanumeric': 0.21090549512643028, 'fraction_numerical': 0.016103969487215708, 'mean_word_length': 2.6122448979591835, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2294779', 'n_tokens_mistral': 3739, 'n_tokens_neox': 3039, 'n_words': 424}