diff options
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/core/js/js.js b/core/js/js.js index 55bc4ffb963..13e0e11b0fb 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -118,48 +118,6 @@ Object.assign(window.OC, { }, /** - * Load a script for the server and load it. If the script is already loaded, - * the event handler will be called directly - * @param {string} app the app id to which the script belongs - * @param {string} script the filename of the script - * @param ready event handler to be called when the script is loaded - * @deprecated 16.0.0 Use OCP.Loader.loadScript - */ - addScript:function(app,script,ready){ - var deferred, path=OC.filePath(app,'js',script+'.js'); - if(!OC.addScript.loaded[path]) { - deferred = $.Deferred(); - $.getScript(path, function() { - deferred.resolve(); - }); - OC.addScript.loaded[path] = deferred; - } else { - if (ready) { - ready(); - } - } - return OC.addScript.loaded[path]; - }, - /** - * Loads a CSS file - * @param {string} app the app id to which the css style belongs - * @param {string} style the filename of the css file - * @deprecated 16.0.0 Use OCP.Loader.loadStylesheet - */ - addStyle:function(app,style){ - var path=OC.filePath(app,'css',style+'.css'); - if(OC.addStyle.loaded.indexOf(path)===-1){ - OC.addStyle.loaded.push(path); - if (document.createStyleSheet) { - document.createStyleSheet(path); - } else { - style=$('<link rel="stylesheet" type="text/css" href="'+path+'"/>'); - $('head').append(style); - } - } - }, - - /** * Loads translations for the given app asynchronously. * * @param {String} app app name @@ -511,9 +469,6 @@ Object.assign(window.OC, { } }); -OC.addStyle.loaded=[]; -OC.addScript.loaded=[]; - /** * Initializes core */ |