One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system
/* | |
* Tween.js | |
* t: current time(当前时间); | |
* b: beginning value(初始值); | |
* c: change in value(变化量); | |
* d: duration(持续时间)。 | |
* you can visit 'http://easings.net/zh-cn' to get effect | |
*/ | |
var Tween = { |
/** | |
* Easing functions | |
* | |
* https://gist.github.com/gre/1650294 | |
* http://easings.net | |
*/ | |
// no easing, no acceleration | |
export function easeLinear(t){ return t; } | |
// accelerating from zero velocity | |
export function easeInQuad(t){ return t*t; } |
/** | |
* 格式化时间戳 格式:yy/mm/dd hh:MM | |
* @param time 时间戳 | |
* @returns {string} yy/mm/dd hh:MM | |
*/ | |
function formatTime(time) { | |
var date = new Date(time); | |
var year = date.getFullYear(); | |
var month = date.getMonth() + 1; | |
var days = date.getDate(); |
/** | |
* 检查平润年,返回正确月份的天数 | |
* @param year 年份 | |
* @param month 月份 | |
* @returns {number} 该月正确的天数 | |
*/ | |
function checkTime(year, month) { | |
if (month === 2) return (year % 4 === 0 && year % 100 !== 0 || year % 400) === 0 ? 29 : 28; | |
return '4;6;9;11'.indexOf(month + ';') === -1 ? 31 : 30; | |
} |
/** | |
* 倒计时 | |
* @param now 现在的时间 | |
* @param startTime 计时开始时间 | |
* @param endTime 计时结束时间 | |
* @returns {*} 计时标识 | |
*/ | |
function countDown(startTime, endTime) { | |
var now = Date.now(); | |
if (now < startTime) { |
/** | |
* 给一个时间戳,返回距离现在多久了 | |
* @param time 一个时间戳 | |
* @returns {*} 时间差 | |
*/ | |
function returnTime(time) { | |
if (isNaN(time) === true) | |
return "Error!" + '"' + time + '"' + " is NaN"; | |
if (time < 0) return "Error! 过去的时间大于现在的时间!"; | |
else { |
[ | |
{ | |
"installDate": 1534259003610, | |
"enabled": true, | |
"updateUrl": "https://userstyles.org/styles/chrome/130739.json", | |
"md5Url": "https://update.userstyles.org/130739.md5", | |
"url": "http://userstyles.org/styles/130739", | |
"originalMd5": "dc4cddc4ac86caaac18a24e2eaea4255", | |
"sections": [ | |
{ |
.main-timeline{ | |
overflow: hidden; | |
position: relative; | |
padding: 60px 0; | |
} | |
.main-timeline:before{ | |
content: ""; | |
width: 1px; | |
height: 100%; | |
background: #cfcdcd; |
git rm -r --cached . | |
git add . | |
git commit -am 'git cache cleared' | |
git push |