diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-10-02 10:16:45 +0200 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-10-02 10:16:45 +0200 |
commit | 4f19466108c084e5ef59df7becd2fc85e85c1524 (patch) | |
tree | 88d1c24535c98508978b4396d92cb313c41c8172 /apps/theming/js | |
parent | 1034efd64078ae303ace86d01164d00351fc58e8 (diff) | |
download | nextcloud-server-4f19466108c084e5ef59df7becd2fc85e85c1524.tar.gz nextcloud-server-4f19466108c084e5ef59df7becd2fc85e85c1524.zip |
Manually instantiate jscolor to avoid csp errors
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'apps/theming/js')
-rw-r--r-- | apps/theming/js/settings-admin.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/theming/js/settings-admin.js b/apps/theming/js/settings-admin.js index afc218b7ffa..28f7645eae7 100644 --- a/apps/theming/js/settings-admin.js +++ b/apps/theming/js/settings-admin.js @@ -106,6 +106,10 @@ function hideUndoButton(setting, value) { $(document).ready(function () { $('#theming [data-toggle="tooltip"]').tooltip(); + // manually instantiate jscolor to work around new Function call which violates strict CSP + var colorElement = $('#theming-color')[0]; + var jscolor = new window.jscolor(colorElement, {hash: true}); + $('#theming .theme-undo').each(function() { var setting = $(this).data('setting'); var value = $('#theming-'+setting).val(); |