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
var join = require('path').join; | |
var DEFAULT_CONFIG = { | |
// spm 源 | |
"registry": "http://private-spm-url", | |
// Rename files | |
// 详见:https://github.com/jeremyruppel/pathmap | |
"pathmap": 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
define("acharts/1.0.0/index-debug", [], function(require, exports, module) { | |
var acharts = require("acharts/1.0.0/src/chart-debug"); | |
acharts.Util = require("acharts/1.0.0/src/util-debug"); | |
acharts.Canvas = require("acharts/1.0.0/src/canvas-debug"); | |
window.Chart = acharts; | |
module.exports = acharts; | |
}); |
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
// example using the raf module from npm. try changing some values! | |
var requestAnimationFrame = require("raf") | |
var moment = require("moment") | |
var canvas = document.createElement("canvas") | |
canvas.width = 500 | |
canvas.height = 500 | |
document.body.appendChild(canvas) |
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
/** | |
* Require the module at `name`. | |
* | |
* @param {String} name | |
* @return {Object} exports | |
* @api public | |
*/ | |
function require(name) { | |
var module = require.modules[name]; |
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
/** | |
* 检测客户端系统中,是否安装了某种字体 | |
* | |
* 在IE中,通过<object classid>的方式,提取系统中的字体库进行判断 | |
* 非IE中,通过字体宽度与默认字体进行比较 | |
* | |
* @example | |
qext.FontDetect.detect(['微软雅黑','Microsoft Yahei'],function(isExist){ | |
//获得html节点 | |
var htmlElm = qing.dom.query('html')[0]; |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>test delegate</title> | |
</head> | |
<body> | |
<script src="https://a.alipayobjects.com/seajs/seajs/2.2.0/sea.js"></script> | |
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
initHotProduct:function() { | |
$("div.J_Product").each(function() { | |
var el = this; | |
var swipe = Swipe(el, { | |
auto: 30000, | |
callback: function(pos) { | |
bullets.removeClass("on"); | |
bullets[pos].className = "on"; | |
} | |
}); |
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
/** | |
* @ref: http://static.xiaomi.cn/2014tv/index.html | |
*/ | |
var g_count = 0; | |
var za = function() { | |
console.log("砸了" + (++g_count) + "次"); | |
var index = Math.floor(Math.random()*3) + 1; | |
$("div.egg-" + index)[0].click(); |
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
// ==UserScript== | |
// @name 增加跳到收银台的链接. | |
// @version 0.1 | |
// @match http://consumeprod.stable.alipay.net/* | |
// @copyright 2013+, 云谦 | |
// ==/UserScript== | |
var els = document.querySelectorAll("p.consume-title a"); | |
for (var i=0; i<els.length; i++) { |
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
// ==UserScript== | |
// @name Pinboard Add Script. | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1 | |
// @description enter something useful | |
// @match http://*/* | |
// @match https://*/* | |
// @copyright 2012+, You | |
// ==/UserScript== |