diff options
| author | Stephen Blott | 2014-11-23 13:42:03 +0000 |
|---|---|---|
| committer | Stephen Blott | 2014-11-23 13:42:03 +0000 |
| commit | 91b123a40e1d5eb54e771461e271f94051618c62 (patch) | |
| tree | 075629ef6e0ce0f0ed1647d74e48bcc9f1e40df5 /lib | |
| parent | 3863e724241408338c9c69af72117584c1258d34 (diff) | |
| download | vimium-91b123a40e1d5eb54e771461e271f94051618c62.tar.bz2 | |
Frames; tidy up.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/utils.coffee | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee index 428112c8..c8a02328 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -145,15 +145,15 @@ Function::curry = -> Array.copy = (array) -> Array.prototype.slice.call(array, 0) -String::startsWith = (str) -> @indexOf(str) == 0 - Array::rotate = (count) -> - return this if @length == 0 - count = count % @length - count = count + @length if count < 0 - Array::push.apply(this, @splice(0, count)) + if @length + count = count % @length + count += @length while count < 0 + Array::push.apply(this, @splice(0, count)) this +String::startsWith = (str) -> @indexOf(str) == 0 + globalRoot = window ? global globalRoot.extend = (hash1, hash2) -> for key of hash2 |
