This file contains hidden or 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
# https://github.com/microsoft/vscode/issues/869 | |
# exclude node_modual except start with @ | |
**/node_modules/[!@]** |
This file contains hidden or 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
Atom-settings |
This file contains hidden or 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
//more detail on https://gist.github.com/paulirish/1579671 | |
rAF = (function(){ | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
function( callback ){ | |
window.setTimeout(callback, 1000 / 60); | |
}; | |
})(); |
This file contains hidden or 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
overflow: hidden; | |
transform: translateZ(0); | |
-webkit-mask-image: -webkit-radial-gradient(circle, white, black); | |
backface-visibility: hidden; | |
perspective: 1000; |
This file contains hidden or 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
/** | |
* on Page Load code snippet from: | |
* https://developer.mozilla.org/en-US/Add-ons/Code_snippets/On_page_load | |
*/ | |
window.addEventListener("load", function load(event) { | |
window.removeEventListener("load", load, false); //remove listener, no longer needed | |
myExtension.init(); | |
}, false); |
This file contains hidden or 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
{ | |
"name": "Gulp-workflow", | |
"version": "0.0.1", | |
"description": "gulp workflow for web development", | |
"main": "index.html", | |
"author": "R.Ten", | |
"license": "", | |
"devDependencies": { | |
"autoprefixer": "^5.1.0", | |
"autoprefixer-core": "^5.1.5", |
This file contains hidden or 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
// 引入 gulp | |
var gulp = require('gulp'); | |
//路径 | |
var src = './', | |
dist = './dist/'; | |
var paths = { | |
js: src + '**/*.js', | |
images: src + '**/*.+(png|jpg|gif)', |
This file contains hidden or 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(){ | |
//http://www.kirupa.com/html5/animating_movement_smoothly_using_css.htm | |
var getSupportedPropertyName = function(properties) { | |
for (var i = 0, len = properties.length; i < len; i++) { | |
if (typeof document.body.style[properties[i]] != 'undefined') { | |
return properties[i]; | |
} | |
} | |
return null; |
This file contains hidden or 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
/*需含有 | |
zepto[http: //zeptojs.com/] 或 jquery [http://jquery.com/] 或 项目前端模板 js/zepto.js js/jquery-vx.js | |
创建私有空间 事件判断 | |
*/ | |
//APP.noop = function(){}; | |
//手势 | |
/** | |
* @param {Object} obj | |
* @param {Zepto|Jquery} obj.$area 移动区的外层,移动区的范围 |
This file contains hidden or 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
JavaScript跨域 | |
1. 单向通信 : | |
可通过简单的新建image, script等元素,通过给src赋值定向到目标url, 可实现跨域请求 | |
例如 | |
html : <button type="button">跨域通信</button> | |
js: | |
<script> | |
var button = document.getElementsByTagName('button')[0]; | |
button.addEventListener('click', function() { |
NewerOlder