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
/* | |
* 不被拦截的 window.open 写法 | |
* 2014-12-25 | |
*/ | |
$('#btn').on('click', function (e) { | |
e.preventDefault(); | |
var handle = window.open('about:blank'); | |
// 模拟 Ajax 返回 | |
$.get('xxx.api', function (data) { | |
if (data) { |
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
/* PhotoShop Transparent Background */ | |
.ps { | |
background-color: #FFF; | |
background-image: -webkit-linear-gradient(bottom left, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%, #CCC), | |
-webkit-linear-gradient(bottom left, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%, #CCC); | |
background-image: -o-linear-gradient(bottom left, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%, #CCC), | |
-o-linear-gradient(bottom left, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%, #CCC); | |
background-image: linear-gradient(to top right, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%, #CCC), | |
linear-gradient(to top right, #CCC 25%, transparent 25%, transparent 75%, #CCC 75%, #CCC);; | |
background-position: 0 0, 8px 8px; |
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
/** | |
* PAC 文件 | |
* By:Alpha | |
*/ | |
/* global isInNet, isPlainHostName, dnsResolve, shExpMatch */ | |
function FindProxyForURL(url, host) { | |
/* 返回代理 */ | |
var proxy = 'PROXY 192.168.0.88:8080; SOCKS 192.168.0.88:8080; DIRECT;', | |
direct = "DIRECT;", i, domain; |
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
'use strict'; | |
var gulp = require('gulp'); | |
var browserSync = require('browser-sync'); | |
var reload = browserSync.reload; | |
var plugins = require('gulp-load-plugins')(); | |
var path = { |
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
{ | |
"name": "static-dev", | |
"version": "0.0.1", | |
"description": "static-dev tools", | |
"main": "", | |
"dependencies": {}, | |
"devDependencies": { | |
"browser-sync": "^2.3.1", | |
"gulp": "^3.8.11", | |
"gulp-autoprefixer": "^2.0.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
'use strict'; | |
var React = require('react-native'); | |
var { | |
AppRegistry, | |
StyleSheet, | |
Text, | |
requireNativeComponent, | |
PropTypes, |
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
<meta name="viewport" content="width=device-width, user-scalable=0, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/> | |
<div></div> | |
<script src="shake.js"></script> | |
<script> | |
Shake.init(); | |
Shake.on('shakeend', function () { | |
var a = document.createElement('p'); | |
a.innerHTML = 'shake end'; | |
document.getElementsByTagName('div')[0].appendChild(a); |
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 compare = (function () { | |
"use strict"; | |
var splitText = function (text) { | |
var map = {}, word = "", prevType = ""; | |
var typeList = { | |
'number': /[-0-9\.]/, | |
'alphabet': /[-'A-Z]/i, | |
'han': /[\u4E00-\u9FA5]/ |
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,Georgia 斜体 + 华文楷体粗 */ | |
@font-face { | |
font-family: 'italic-alpha'; | |
unicode-range: U+0000-00FF; | |
src: local('Georgia-Italic'); | |
} | |
@font-face { | |
font-family: 'italic-alpha'; | |
unicode-range: U+4E00-9FFF; | |
src: local('STKaiti-SC-Bold'); |