diff options
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/core/js/js.js b/core/js/js.js index d78b0159cfa..12c47d546c1 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -368,15 +368,9 @@ var OCP = {}, addScript:function(app,script,ready){ var deferred, path=OC.filePath(app,'js',script+'.js'); if(!OC.addScript.loaded[path]) { - deferred = jQuery.ajax({ - url: path, - cache: true, - success: function (content) { - window.eval(content); - if(ready) { - ready(); - } - } + deferred = $.Deferred(); + $.getScript(path, function() { + deferred.resolve(); }); OC.addScript.loaded[path] = deferred; } else { |