diff options
| author | Phil Crosby | 2012-06-12 10:52:14 -0700 |
|---|---|---|
| committer | Phil Crosby | 2012-06-12 22:00:35 -0700 |
| commit | 2b811c913e4f64fbda5dd8cba35415f943624c81 (patch) | |
| tree | 80af2ba952d96cf59a5f2a8234a8fe1d410105c3 /lib | |
| parent | f33de347f0de1448446eac462892addbe7a3c461 (diff) | |
| download | vimium-2b811c913e4f64fbda5dd8cba35415f943624c81.tar.bz2 | |
Add a global extend function
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/utils.coffee | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee index e9409826..c83a6cf8 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -129,6 +129,12 @@ Class = newClass.constructor = newClass newClass +globalRoot = if window? then window else global +globalRoot.extend = (hash1, hash2) -> + for key of hash2 + hash1[key] = hash2[key] + hash1 + root = exports ? window root.Utils = Utils root.Class = Class |
