news.js 4.7 KB

1
  1. (function(c,j,i){var k="1.0";var a=["showActionMenu","deleteShareItems","enableShowBigImg","getGestureQuit","newsDetailJumpToWorldcup","setGestureQuit","setShareArticleInfo","setTitle","shareFromWebView","showLoginWithType","showNativeLogin","showNativeLoginWithType","zoomImageSrc","disableQuitBySlideLeft","downloadAppFromBrowser","getAdPageInfo","setOrientationEnable","checkCanOpenNativeUrl","clearData","clearMainAccount","clearUserData","copy","downloadApp","getAppInfo","getAppVersionName","getAppversion","getData","getImei","getMainAccount","getNetworkStatus","getUid","getUserData","gotoMyPurchase","isAvailable","isQQLogin","isWeixinLogin","onCancel","onFailure","onResponse","onSuccess","openApp","openNativeUrl","playVideo","postData","queryData","sendBoss","sendPayRequest","setData","setUserData","showErrorTips","showFlower","showNews","showShareMenu","showSuccessTips","showTextTips","showWarningTips","startMicBlowListen","stopMicBlowListen","wPay","weixinPay","showStarSignSwitch","starSignTabSelected","checkAppDownLoadState","downloadAppByLocal","startAudioRecord","stopAudioRecord","playAudioVoice","stopAudioVoice","pauseAudioVoice","uploadAudioVoice","downloadAudioVoice","openUrlByWX","addCardToWXCardPackage","getAwardInfo","storeUserAddress"];var e={};e.callBackQueue=[];var f=Array.prototype.slice;var b=navigator.userAgent;function m(){var o=b.match(/qqnews\/([\.\d]+)/i);return o&&o[1]?o[1]:"0.0.0"}function l(){return/android/i.test(b)?true:false}function n(u,t,w){var v=w&&w.lexicographical,r=w&&w.zeroExtend,p=u.split("."),s=t.split(".");function o(y){return(v?/^\d+[A-Za-z]*$/:/^\d+$/).test(y)}if(!p.every(o)||!s.every(o)){return NaN}if(r){while(p.length<s.length){p.push("0")}while(s.length<p.length){s.push("0")}}if(!v){p=p.map(Number);s=s.map(Number)}for(var q=0;q<p.length;++q){if(s.length==q){return 1}if(p[q]==s[q]){continue}else{if(p[q]>s[q]){return 1}else{return -1}}}if(p.length!=s.length){return -1}return 0}e.javascriptBridgeCallBack=function(){var p=f.call(arguments,0);var o=Nubmer(p.shift());e.callBackQueue[o].apply(this,p)};function h(s){var v=[];var u=s.shift();var t=s.length;for(var o=0;o<t;o++){var r=s[o];var p=typeof r;if(r==null){v[v.length]="string"}else{v[v.length]=p}if(p=="function"){var q=e.callBackQueue.length;e.callBackQueue[q]=r;s[o]=q}if(p=="object"){if(r.onCallback){e.callBackQueue[u]=r.onCallback}s[o]=JSON.stringify(r)}}return JSON.stringify({method:u,types:v,args:s,instanceName:j})}function g(){var p=f.call(arguments,0);var o=new Image();o.onload=function(){o=null};o.src="jsbridge://get_with_json_data?json="+encodeURIComponent(h(p))}function d(){var q=f.call(arguments,0);var o=prompt(h(q));var p=JSON.parse(o);if(p.code!=200){throw"call error, code:"+p.code+", message:"+p.result}return p.result}e.callback=function(p,o){if(e.callBackQueue[p]){e.callBackQueue[p](o)}};if(l()&&typeof c[j]=="undefined"&&!c[j]&&n(m(),"4.4.5")>0){a.forEach(function(o){e[o]=function(){switch(i){case 1:return g.apply(e,[o].concat(f.call(arguments,0)));default:return d.apply(e,[o].concat(f.call(arguments,0)))}}});e.startRecord=function(){if(e.startAudioRecord){e.startAudioRecord()}};e.stopRecord=function(o){e.callBackQueue.stopRecord=o;if(e.stopAudioRecord){e.stopAudioRecord()}};e.onVoiceRecordEnd=function(o){e.callBackQueue.onVoiceRecordEnd=o};e.playVoice=function(o){if(o&&e.playAudioVoice){e.playAudioVoice(o.localId)}};e.pauseVoice=function(o){if(o&&e.pauseAudioVoice){e.pauseAudioVoice(o.localId)}};e.stopVoice=function(o){if(o&&e.stopAudioVoice){e.stopAudioVoice(o.localId)}};e.onVoicePlayEnd=function(o){e.callBackQueue.onVoicePlayEnd=o};e.uploadVoice=function(o){e.callBackQueue.uploadVoice=o;if(e.uploadAudioVoice&&o){e.uploadAudioVoice(o.localId,o.isShowProgressTips)}};e.downloadVoice=function(o){e.callBackQueue.downloadVoice=o;if(e.downloadAudioVoice){e.downloadAudioVoice(o.serverId,o.voiceUrl,o.isShowProgressTips)}};e.openUrlInWX=function(o){if(e.openUrlByWX){e.openUrlByWX(o.url)}};e.stopRecordSuccess=function(p,o){var q={};q.localId=p;q.currentApp=o;if(e.callBackQueue.stopRecord){e.callBackQueue.stopRecord.success(q)}};e.onRecordEnd=function(p,o){if(e.callBackQueue.onVoiceRecordEnd){var q={};q.localId=p;q.currentApp=o;e.callBackQueue.onVoiceRecordEnd.complete(q)}};e.onAudioVoicePlayEnd=function(p,o){var q={};q.localId=p;q.currentApp=o;if(e.callBackQueue.onVoicePlayEnd){e.callBackQueue.onVoicePlayEnd.success(q)}};e.onUploadAudioVoiceSuccess=function(p,r,o){if(e.callBackQueue.uploadVoice){var q={};q.serverId=p;q.voiceUrl=r;q.currentApp=o;e.callBackQueue.uploadVoice.success(q)}};e.onDownloadVoiceSuccess=function(p,o){var q={};q.localId=p;q.currentApp=o;e.callBackQueue.downloadVoice.success(q)};c[j]=e}}(this,"TencentNews",2));/* |xGv00|cee13f8f42b0181258c80935d0c38b40 */