Skip to content

Instantly share code, notes, and snippets.

View senola's full-sized avatar
🎯
Focusing

tanfeng senola

🎯
Focusing
View GitHub Profile
@senola
senola / analytics.js
Created December 20, 2018 09:09 — forked from zmmbreeze/analytics.js
GA的源码 analytics.js
(function() {
/**
* 记录方法使用情况的类
* @param {Array.<boolean>} umMap 初始的使用情况
*/
var UsageManager = function(umMap) {
this.umMap = umMap || [];
};
/**
* 记录新的使用情况
@senola
senola / dabblet.css
Created October 27, 2018 08:50 — forked from csssecrets/dabblet.css
Checkerboard with SVG
/**
* Checkerboard with SVG
*/
background: #eee url('data:image/svg+xml,\
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill-opacity=".25" >\
<rect x="50" width="50" height="50" />\
<rect y="50" width="50" height="50" />\
</svg>');
background-size: 30px 30px;
@senola
senola / requestAnimationFrame.js
Last active January 20, 2017 02:41
requestAnimationFrame兼容写法
window.requestAnimationFrame =
window.__requestAnimationFrame ||
window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
(function () {
return function (callback, element) {
var lastTime = element.__lastTime;