This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var wrap=document.getElementById('page'); | |
var contentHeight=wrap.offsetHeight; | |
var yOffset=window.pageYOffset; | |
var y = yOffset + window.innerHeight; | |
function autoRefesh(){ | |
wrap=document.getElementById('page'); | |
contentHeight=wrap.offsetHeight; | |
yOffset=window.pageYOffset; | |
y = yOffset + window.innerHeight; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isWechat=false; | |
UA=navigator.userAgent.toLowerCase(); | |
if(UA.match(/MicroMessenger/i)=="micromessenger"){ | |
isWechat = true; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var scrollTimeout = null; | |
document.addEventListener('scroll',function(event){ | |
clearTimeout(scrollTimeout); | |
scrollTimeout=setTimeout(function(){ | |
list.newViewedStat(); | |
},100); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Luo Lei 罗磊 | |
Cheetah mobile | F2E | |
Mobile: (+86) 186-8882-3265 | QQ: 526020986 | Mail:[email protected] | |
Fuxing International Center,237 Chaoyang Bei Lu,Chaoyang District,Beijing,100020, China | |
猎豹移动 | 北京市朝阳区朝阳北路237号复星国际中心20层 猎豹移动(原金山网络) 用户体验部 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nohup node server.js > /dev/null 2>&1 & | |
nohup means: Do not terminate this process even when the stty is cut off. | |
> /dev/null means: stdout goes to /dev/null (which is a dummy device that does not record any output). | |
2>&1 means: stderr also goes to the stdout (which is already redirected to /dev/null). | |
& at the end means: run this command as a background task. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.wrap{ | |
width:50%; | |
height:300px; | |
positon:relative; | |
} | |
.center{ | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
width:50%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 百度统计 | |
* 需要放在<head></head> | |
*/ | |
<script> | |
var _hmt = _hmt || []; | |
(function() { | |
var hm = document.createElement("script"); | |
hm.type = 'text/javascript'; | |
hm.async = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 在 Android 下 UA | |
* mozilla/5.0 (linux; u; android 4.1.2; zh-cn; mi-one plus build/jzo54k) applewebkit/534.30 (khtml, like gecko) version/4.0 mobile safari/534.30 micromessenger/5.0.1.352 | |
*在 iOS 下 UA | |
* mozilla/5.0 (iphone; cpu iphone os 5_1_1 like mac os x) applewebkit/534.46 (khtml, like gecko) mobile/9b206 micromessenger/5.0 | |
*/ | |
function isWeixinBrowser(){ | |
var ua = navigator.userAgent.toLowerCase(); | |
return (/micromessenger/.test(ua)) ? true : false ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// set the date we're counting down to | |
var target_date = new Date("Aug 15, 2019").getTime(); | |
// variables for time units | |
var days, hours, minutes, seconds; | |
// get tag element | |
var countdown = document.getElementById("countdown"); | |
// update the tag with id "countdown" every 1 second |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tryOpenQV: function(url) { | |
var targetOpenUrl = 'tenvideo2://?action=4'; | |
var targetDownloadUrl = 'http://mcgi.v.qq.com/commdatav2?cmd=4&confid=107&platform=aphone'; | |
if (!IsAndroid) { | |
targetDownloadUrl = 'https://itunes.apple.com/cn/app/id458318329?mt=8'; | |
} | |
setTimeout(function() { | |
var startTime = (new Date).valueOf(); | |
if (IsAndroid) { |