From 4681b1808175ca9ce3329f3bcf9d49aecbeccf9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 15 Jan 2019 19:16:36 +0100 Subject: [PATCH] Use watch parameter for css-vars-ponyfill and remove the global variable 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 | 5 ----- core/src/globals.js | 5 ++++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/core/js/js.js b/core/js/js.js index a99a6d547d..11c07fec33 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1350,11 +1350,6 @@ function initCore() { $('html').addClass('edge'); } - // css variables fallback for IE - if (msie > 0 || trident > 0) { - cssVars(); - } - $(window).on('unload.main', function() { OC._unloadCalled = true; }); diff --git a/core/src/globals.js b/core/src/globals.js index 770ae223af..7f78f9ed9c 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -48,13 +48,16 @@ import 'snap.js/dist/snap' import 'strengthify' import 'strengthify/strengthify.css' +cssVars({ + watch: true +}) + window['_'] = _ window['$'] = $ window['autosize'] = autosize window['Backbone'] = Backbone window['Clipboard'] = ClipboardJS window['ClipboardJS'] = ClipboardJS -window['cssVars'] = cssVars window['dav'] = dav window['DOMPurify'] = DOMPurify window['Handlebars'] = Handlebars