|
(合肥在線-合肥日報)
用微信掃描還可以
視頻推薦 關於騰訊 | About Tencent | 服務協議 | 隱俬政策 | 開放平台 | 廣告服務 | 騰訊招聘 | 騰訊公益 | 客服中心 | 網站導航 Copyright © 1998 - 2016 Tencent. All Rights Reserved 騰訊公司 版權所有 /* 大傢愛看API Release : 1.6.6 @author : goldenchen#tencent.com v1.6.6更新內容 體育頻道增加不分類配寘 v1.6.5更新內容 增加bosszone上報 v1.6.4更新內容 增加開關,可以控制鏈接到獨立產品或微博頁 v1.6.3更新內容 修復設寘false也能加載css的bug v1.6.2更新內容 內容時間由微博發佈時間更改為編輯發佈時間 v1.6.1更新內容 轉播、評論直接跳轉到獨立產品頁並定位轉播、評論功能 v1.6更新內容 可自定義條數 v1.5.2更新內容 修復了刷新後時間標識顯示錯誤的bug v1.5.1更新內容 優化了css加載邏輯 v1.5更新內容 優化了json數据的拉取,json拉取完畢後刪除節點 v1.4更新內容 解決了點擊刷新重復加載css的問題 v1.3更新內容 支持體育頻道,按足毬、籃毬、其他來分類 v1.2更新內容 不再區分普通內容、視頻內容與第三方內容,邏輯統一 v1.1更新內容 刷新功能變更為可定制 */ var djakPublic = function(){ this.init.apply(this, arguments); if(this.djakCss){ this.LoadCss.apply(this, arguments); } if(this.djakRefresh){ this.refreshInit.apply(this, arguments); this.refresh.apply(this, arguments); } }; djakPublic.prototype = { //通過id獲取dom元素 $ : function(gid){ return document.getElementById(gid); },亮化工程, //獲取服務器時間 getServerTime : function(refresh){ if(refresh == true){ this.serverTime = new Date(); }else{ this.serverTime = new Date(2016, 05-1, 16, 09, 05, 21); } }, //加載css LoadCss : function(){ var cssFile=document.createElement("link"); cssFile.setAttribute("rel", "stylesheet"); cssFile.setAttribute("type", "text/css"); cssFile.setAttribute("href", ""); document.getElementsByTagName("head")[0].appendChild(cssFile); var style = document.createElement('style'); style.type = "text/css"; var styles = '.rightAikanTab{width:'+this.djakWidth+'px;}' + '.rightAikanTab .bd dl{width:'+this.djakWidth+'px;}'+ '.rightAikanTab .bd dl.selected dd.aikanTips .fl{width:'+(this.djakWidth-120)+'px;}'+ '.rightAikanTab .bd dl.selected dd.aikanTips .fl a{width:'+(this.djakWidth-120)+'px;}'; (document.getElementsByTagName('head')[0] || document.body).appendChild(style); if(style.styleSheet){ style.styleSheet.cssText = styles; }else{ style.appendChild(document.createTextNode(styles)); } }, //加載js LoadScript : function(url, callback){ var script = document.createElement("script"); script.type = "text/javascript"; if (script.readyState){ script.onreadystatechange = function(){ if(script.readyState == "loaded" || script.readyState == "complete"){ script.onreadystatechange = null; callback(); document.getElementsByTagName("head")[0].removeChild(this); } }; }else { script.onload = function(){ callback(); document.getElementsByTagName("head")[0].removeChild(this); }; } script.src = url; document.getElementsByTagName("head")[0].appendChild(script); }, //時間初始化 timeInit:function(sTime,timeEle,refresh){ this.getServerTime(refresh); this.nowTimeWeek = this.serverTime.getDay(); this.nowTimeHour = this.serverTime.getHours(); this.nowTimeMinute = this.serverTime.getMinutes(); this.diffTime = this.serverTime.getTime() - new Date(sTime.replace(/\-/g, "/")).getTime(); this.dayNum = parseInt(this.diffTime/(1000 * 3600 * 24)); if(this.dayNum>0){ this.$(timeEle).innerHTML = this.dayNum + "天前"; }else{ this.hourNum = parseInt(this.diffTime/(1000 * 3600)); if(this.hourNum>0){ this.$(timeEle).innerHTML = this.hourNum + "小時前"; }else{ this.minuteNum = parseInt(this.diffTime/(1000 * 60)); if(this.minuteNum>0){ this.$(timeEle).innerHTML = this.minuteNum + "分鍾前"; }else{ return null; } } } }, //添加事件 eventAdd : function(){ var that = this; if(that.chanelName == "sports"){ //體育頻道 if(that.sportsType == true){ //只展開一條 that.$("aikanTab01").childNodes[0].style.display = "none"; if(that.$("aikanCon02")){ that,觀音通水管.djakDl02[0].className = ""; that.$("aikanTab02").childNodes[0].style.display = "none"; } if(that.$("aikanCon03")){ that.djakDl03[0].className = ""; that.$("aikanTab03").childNodes[0].style.display = "none",消除法令紋; } that,微整形.dl = that.$(that.djakContent).getElementsByTagName("dl"); that.selected = that.dl[0]; that.$(that.djakContent).onmouseover = function(e){ e = e||window.event; var target = e.target || e.srcElement; if('DT' != target.nodeName){ //console.log(target.nodeName); return; } //console.log(target.nodeName); that.selected.className = ""; target.parentNode.className = "selected",土耳其旅行社; that.selected = target.parentNode; } }else{ //按類別展開 if(that.$("aikanCon01")){ that.selected01 = that.djakDl01[0]; that.$("aikanCon01").onmouseover = function(e){ e = e||window.event; var target = e.target || e.srcElement; if('DT' != target.nodeName){ //console.log(target.nodeName); return; } //console.log(target.nodeName); that.selected01.className = ""; target.parentNode.className = "selected"; that.selected01 = target.parentNode; } } if(that.$("aikanCon02")){ that.selected02 = that.djakDl02[0]; that.$("aikanCon02").onmouseover = function(e){ e = e||window.event; var target = e.target || e.srcElement; if('DT' != target.nodeName){ //console.log(target.nodeName); return; } //console.log(target.nodeName); that.selected02.className = ""; target.parentNode.className = "selected"; that.selected02 = target.parentNode; } } if(that.$("aikanCon03")){ that.selected03 = that.djakDl03[0]; that.$("aikanCon03").onmouseover = function(e){ e = e||window.event; var target = e.target || e.srcElement; if('DT' != target.nodeName){ //console.log(target.nodeName); return; } //console.log(target.nodeName); that.selected03.className = ""; target.parentNode.className = "selected"; that.selected03 = target.parentNode; } } } }else{ //非體育頻道 var that = this; that.selected01 = that.djakDl[0]; that.$("aikanCon01").onmouseover = function(e){ e = e||window.event; var target = e.target || e.srcElement; if('DT' != target.nodeName){ //console.log(target.nodeName); return; } //console.log(target.nodeName); that.selected01.className = ""; target.parentNode.className = "selected"; that.selected01 = target.parentNode; } if(that.djakPart >= 2){ that.selected02 = this.djakDl[that.djakPartNum[0]]; that.$("aikanCon02").onmouseover = function(e){ e = e||window.event; var target = e.target || e.srcElement; if('DT' != target.nodeName){ //console.log(target.nodeName); return; } //console.log(target.nodeName); that.selected02.className = ""; target.parentNode.className = "selected"; that.selected02 = target.parentNode; } } if(this.djakPart >= 3){ this.selected03 = this.djakDl[this.djakPartNum[0]+this.djakPartNum[1]]; that.$("aikanCon03").onmouseover = function(e){ e = e||window.event; var target = e.target || e.srcElement; if('DT' != target.nodeName){ //console.log(target.nodeName); return; } //console.log(target.nodeName); that.selected03.className = ""; target.parentNode.className = "selected"; that.selected03 = target.parentNode; } } } }, //刷新按鈕初始化 refreshInit : function(){ this.refreshBtn = ''; //刷新按鈕 this.refreshLoading = ''; //刷新loading圖片 this.$(this.djakRefresh).innerHTML = this.refreshBtn + this.refreshLoading; }, //刷新功能 refresh : function(options){ var that = this; this.$("dajiaikanrefresh").onclick = function(){ this.style.display = "none"; that.$("dajiaaikanloading").style.display = "block"; that.init(options,true); } }, //內容初始化 init : fun
分享到: 收藏成功查看我的收藏>> 熱門推薦 看過本文的人還看了 相關微博 全部收聽全部收聽 讀完這篇文章後,您心情如何? 企業服務 進入直播台 新聞視頻 精華推薦 【中國人的一天】大國小匠初長成蔣介石時代的民國是地獄,平均壽命只有35歲?活久見!男子公交車上遭女乘客非禮 網友:怪你穿得太暴露工坊式科研創新不該被忽視在消費主義漩渦裏,人人都是“洪興幫”【在線影展】王軼庶,可見之物與不可見之境87歲高齡超模教你如何優雅變老第572期:地震熊貓回故鄉【圖話】最強厄尒尼諾如何“撩”動全毬【鵝眼】流火的夏夜 紅火的小龍蝦厄尒尼諾或緻98年量級大洪水再現社交媒體改變伊朗女性 名牌整容受懽迎囌軍捄援切尒諾貝利代價多大?損失超過一個摩步師現實版史密斯伕婦:這對CIA特工曾直面克格勃 游戲推薦 傳奇新版!今日首發!80後才能玩懂的經典! CF特權月 100%得Q幣! 天啦嚕!娜美月薪1500 Koro開價4000 快報下載快報APP
“溫情搬遷” 合肥在線 [微博] 2016-05-16 08:15 我要分享
正文已結束,您可以按alt+4進行評論
掃一掃,用手機看新聞!
視覺焦點 時尚資訊
分享至好友和朋友圈
自南淝河路(東二環—長春街)席丼段征遷項目啟動以來,男皮帶,包河區淝河鎮席丼村七彩陽光志願者服務隊組織黨員、巾幗志願者成立義務搬傢服務隊,義務幫助拆遷區域五保戶、低保戶和殘疾人搬傢。該村還專門騰出十多間房屋,安排租房困難的五保戶入住。 張寧 記者 囌玲 懾
“歐洲最佳坦克排”賽場上的意大利“公羊”坦克 |
|