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
{ | |
"pc0": "chl_api_m", // _cf_chl_opt.cType, | |
"Sxap5": "8721", // fu._cf_chl_opt.cNounce, | |
"lGAQX9": "2", // fu._cf_chl_opt.cvId, | |
"TPmikX3": 0, // static | |
"wxi0": 0, // static | |
"KeW5": 1, // static | |
"Vqo3": { // fu._cf_chl_opt.cRq, | |
"ru": "aHR0cDovL2NoYWxsZW5nZXMuY2xvdWRmbGFyZS5jb20vY2RuLWNnaS9jaGFsbGVuZ2UtcGxhdGZvcm0vaC9nL3R1cm5zdGlsZS9pZi9vdjIvYXYwL3JjdjAvMC9nZmdoNS8weDRBQUFBQUFBRG5QSURST3JtdDFXd2ovZGFyay9ub3JtYWw=", | |
"ra": "TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzExNS4wLjAuMCBTYWZhcmkvNTM3LjM2", |
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
{ | |
"1": { | |
"i": "lfNYMzn/1UU=", | |
"h": "yes", | |
"tH": "", | |
"t": 21, | |
"DCibg7": 0, | |
"sOrUv4": { | |
"p": "Win32", | |
"l": [ |
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
/** | |
* base Function | |
* @param {[type]} opts [description] | |
* @return {[type]} [description] | |
*/ | |
function animate(opts) { | |
var start = new Date(); | |
var id = setInterval(function () { | |
var timePassed = new Date() - start; |
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 debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
var later = function() { | |
timeout = null; | |
if (!immediate) func.apply(context, args); | |
}; | |
var callNow = immediate && !timeout; | |
clearTimeout(timeout); |
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
/** | |
* tiltfx.js | |
* http://www.codrops.com | |
* | |
* Licensed under the MIT license. | |
* http://www.opensource.org/licenses/mit-license.php | |
* | |
* Copyright 2015, Codrops | |
* http://www.codrops.com | |
*/ |
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 throttle(fn, delay) { | |
var allowSample = true; | |
return function(e) { | |
if (allowSample) { | |
allowSample = false; | |
setTimeout(function() { allowSample = true; }, delay); | |
fn(e); | |
} | |
}; |
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 preload = (function (file) { | |
if (/*@cc_on!@*/false) { //IE | |
return function (file) { | |
new Image().src = file; //图像灯塔 | |
}; | |
} else { | |
return function (file) { | |
var obj = document.createElement('object'), | |
body = document.body; | |
obj.width = 0; |
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 publisher = { | |
subscribers: { | |
any: [] // 事件类型:订阅者 | |
}, | |
subscribe: function (fn, type) { | |
type = type || 'any'; | |
if (typeof this.subscribers[type] === 'undefined') { | |
this.subscribers[type] = []; | |
} | |
this.subscribers[type].push(fn); |
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 Player(name) { | |
this.points = 0; | |
this.name = name; | |
} | |
Player.prototype.play = function () { | |
this.points += 1; | |
mediator.played(); | |
}; |
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 myevent = { | |
// 通过直接调用 stop 来一起调用preventDefault(),stopPropagation() | |
stop: function (e) { | |
if (typeof e.preventDefault === 'function') { | |
e.preventDefault(); | |
} | |
if (typeof e.stopPropagation === 'function') { | |
e.stopPropagation(); | |
} | |
// IE browser |
NewerOlder