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
/* | |
Native FullScreen JavaScript API | |
CopyRight: Johndyer, http://johndyer.name/native-fullscreen-javascript-api-plus-jquery-plugin/ | |
------------- | |
Assumes Mozilla naming conventions instead of W3C for now | |
*/ | |
(function() { | |
var | |
fullScreenApi = { | |
supportsFullScreen: false, |
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 (factory) { | |
if (typeof define === "function" && define.amd) { | |
// AMD模式 | |
define([ "jquery" ], factory); | |
} else { | |
// 全局模式 | |
factory(jQuery); | |
} | |
}(function ($) { | |
"use strict"; |
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
/** | |
* @Description: jQuery 数组随机抽奖 | |
* @Author: wangjun | |
* @Update: 2014-07-22 17:00 | |
* @Github URL: https://github.com/nevergiveup-j | |
*/ | |
!function($){ | |
"use strict"; |
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
/** | |
* @param {String} msg 错误信息 | |
* @param {String} url 出错的文件 | |
* @param {Long} line 出错代码的行号 | |
* @param {Long} col 出错代码的列号 | |
* @param {Object} error 错误的详细信息,Anything | |
*/ | |
window.onerror = function(msg,url,line,col,error){ | |
//没有URL不上报!上报也不知道错误 | |
if (msg != "Script error." && !url){ |
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
this._requestAnimationFrame = (function(){ | |
return window.requestAnimationFrame || | |
window.webkitRequestAnimationFrame || | |
window.mozRequestAnimationFrame || | |
window.oRequestAnimationFrame || | |
window.msRequestAnimationFrame || | |
function(/* function */ callback, /* DOMElement */ element){ | |
window.setTimeout(callback, 1000 / 60); | |
}; | |
})(); |