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 getViewport() { | |
var viewPortWidth; | |
var viewPortHeight; | |
// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight | |
if (typeof window.innerWidth != 'undefined') { | |
viewPortWidth = window.innerWidth, | |
viewPortHeight = window.innerHeight | |
} |
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
define (require, exports, module) -> | |
'use strict' | |
BinaryParser = require('lib/binary-parser') | |
hexTable = ((if i <= 15 then '0' else '') + i.toString(16) for i in [0...256]) | |
class ObjectID | |
constructor: (id, _hex) -> | |
@_bsontype = 'ObjectID' |
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
# 如果是 node 环境,则通过 exports 来获取全局域 | |
# 如果是 BOM 环境,则通过 this 来获取全局域 | |
root = exports ? this |