Animated SVG for use as loading animations.
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
// http://eslint.org/docs/user-guide/configuring | |
module.exports = { | |
root: true, | |
env: { | |
browser: true, | |
}, | |
// https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style | |
extends: 'standard', | |
extends: 'vue', |
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
Array.prototype.last = function () { | |
return this[this.length - 1] | |
} |
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 getRandomColor = function () { | |
var str = '#' | |
for (var i = 0; i < 6; i++) { | |
str += '0123456789abcdef' [Math.floor(Math.random() * 16)] | |
} | |
return str | |
} |
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 arr=[ | |
{ | |
name:'myName0' | |
}, | |
{ | |
name:'myName1' | |
}, | |
{ | |
name:'myName2' | |
}, |
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 client = { | |
id: "", | |
secret: "" | |
}; | |
var redirect_uri = "http://lizheming.com:8360/login/callback"; | |
var querystring = require("querystring"); | |
var request = require("request"); |
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
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
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
//Mobile Safari in standalone mode | |
if (("standalone" in window.navigator) && window.navigator.standalone) { | |
// If you want to prevent remote links in standalone web apps opening Mobile Safari, change 'remotes' to true | |
var noddy, | |
remotes = false; | |
document.addEventListener('click', function(event) { | |
noddy = event.target; | |
//Bubble up until we hit link or top HTML element. Warning: BODY element is not compulsory so better to stop on HTML | |
while (noddy.nodeName !== "A" && noddy.nodeName !== "HTML") { | |
noddy = noddy.parentNode; |
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
//http://momentjs.cn/docs/#/durations/ | |
//a more easy scrollspy | |
$(function(){ | |
'use strict'; | |
function ScrollSpy(element, options) { | |
var process = $.proxy(this.process, this); | |
this.$body = $('body'); | |
this.$scrollElement = $(window); |
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
function getParam(param){ | |
var url=location.href; | |
var reg =new RegExp(param+'=(.*)'); | |
var index=url.indexOf('?'); | |
var param_str=url.substr(index); | |
var paramArray=reg.exec(param_str); | |
if(paramArray.length==2){ | |
return paramArray[1]; | |
}else{ | |
return ''; |