From a36604d2ec68a99db6c84f6ad5ad99cbb9764040 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Fri, 4 Jan 2019 11:24:50 +0100 Subject: Add public API for loading js files asynchronously MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- core/js/js.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index a99a6d547d7..73a9c32a91a 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -39,7 +39,7 @@ function escapeHTML(s) { } /** @namespace OCP */ -var OCP = {}, +var OCP = Object.assign({}, window.OCP), /** * @namespace OC */ @@ -367,6 +367,7 @@ var OCP = {}, * @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'); @@ -387,6 +388,7 @@ var OCP = {}, * 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'); -- cgit v1.2.3 From a86ee002bcb4bc457ce9d55b0d56424ea57c933b Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Tue, 15 Jan 2019 19:57:51 +0100 Subject: Watch for changes with css variables polyfill MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- core/js/js.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/js/js.js') diff --git a/core/js/js.js b/core/js/js.js index 73a9c32a91a..e306e2a7369 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1354,7 +1354,9 @@ function initCore() { // css variables fallback for IE if (msie > 0 || trident > 0) { - cssVars(); + cssVars({ + watch: true + }); } $(window).on('unload.main', function() { -- cgit v1.2.3