fix menu for opera

This commit is contained in:
James Campos 2011-05-09 22:09:37 -07:00
parent e323e97a90
commit d4a6f818a5
2 changed files with 16 additions and 0 deletions

View File

@ -446,6 +446,17 @@
}
});
}
if (!Object.keys) {
Object.keys = function(o) {
var key, _i, _len, _results;
_results = [];
for (_i = 0, _len = o.length; _i < _len; _i++) {
key = o[_i];
_results.push(key);
}
return _results;
};
}
$$ = function(selector, root) {
if (root == null) {
root = d.body;

View File

@ -315,6 +315,11 @@ else
name = NAMESPACE + name
localStorage[name] = JSON.stringify value
# XXX opera cannot into Object.keys
if not Object.keys
Object.keys = (o) ->
key for key in o
$$ = (selector, root=d.body) ->
Array::slice.call root.querySelectorAll selector