diff options
Diffstat (limited to 'core/src/globals.js')
-rw-r--r-- | core/src/globals.js | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/core/src/globals.js b/core/src/globals.js index e7f2b075374..7c5ccd77e25 100644 --- a/core/src/globals.js +++ b/core/src/globals.js @@ -1,8 +1,10 @@ -/* eslint-disable @nextcloud/no-deprecations */ /** * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at> * - * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at> + * @author Christoph Wurst <christoph@winzerhof-wurst.at> + * @author John Molakvoæ <skjnldsv@protonmail.com> + * @author Julius Härtl <jus@bitgrid.net> + * @author Roeland Jago Douma <roeland@famdouma.nl> * * @license GNU AGPL version 3 or any later version * @@ -17,9 +19,11 @@ * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * */ +/* eslint-disable @nextcloud/no-deprecations */ import { initCore } from './init' import _ from 'underscore' @@ -36,12 +40,10 @@ import Backbone from 'backbone' import 'bootstrap/js/dist/tooltip' import './Polyfill/tooltip' import ClipboardJS from 'clipboard' -import dav from 'davclient.js' -import DOMPurify from 'dompurify' +import { dav } from 'davclient.js' import Handlebars from 'handlebars' import 'jcrop/js/jquery.Jcrop' import 'jcrop/css/jquery.Jcrop.css' -import jstimezonedetect from 'jstimezonedetect' import md5 from 'blueimp-md5' import moment from 'moment' import 'select2' @@ -53,7 +55,6 @@ import 'strengthify/strengthify.css' import OC from './OC/index' import OCP from './OCP/index' import OCA from './OCA/index' -import escapeHTML from 'escape-html' import { getToken as getRequestToken } from './OC/requesttoken' const warnIfNotTesting = function() { @@ -100,22 +101,19 @@ const setDeprecatedProp = (global, cb, msg) => { }) } -window['_'] = _ -setDeprecatedProp(['$', 'jQuery'], () => $, 'The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own.') +window._ = _ +setDeprecatedProp(['$', 'jQuery'], () => $, 'The global jQuery is deprecated. It will be removed in a later versions without another warning. Please ship your own.') setDeprecatedProp('autosize', () => autosize, 'please ship your own, this will be removed in Nextcloud 20') setDeprecatedProp('Backbone', () => Backbone, 'please ship your own, this will be removed in Nextcloud 20') setDeprecatedProp(['Clipboard', 'ClipboardJS'], () => ClipboardJS, 'please ship your own, this will be removed in Nextcloud 20') -window['dav'] = dav -setDeprecatedProp('DOMPurify', () => DOMPurify, 'The global DOMPurify is deprecated, this will be removed in Nextcloud 21') +window.dav = dav setDeprecatedProp('Handlebars', () => Handlebars, 'please ship your own, this will be removed in Nextcloud 20') -setDeprecatedProp(['jstz', 'jstimezonedetect'], () => jstimezonedetect, 'please ship your own, this will be removed in Nextcloud 20') setDeprecatedProp('md5', () => md5, 'please ship your own, this will be removed in Nextcloud 20') setDeprecatedProp('moment', () => moment, 'please ship your own, this will be removed in Nextcloud 20') -window['OC'] = OC +window.OC = OC setDeprecatedProp('initCore', () => initCore, 'this is an internal function') setDeprecatedProp('oc_appswebroots', () => OC.appswebroots, 'use OC.appswebroots instead, this will be removed in Nextcloud 20') -setDeprecatedProp('oc_capabilities', OC.getCapabilities, 'use OC.getCapabilities instead, this will be removed in Nextcloud 20') setDeprecatedProp('oc_config', () => OC.config, 'use OC.config instead, this will be removed in Nextcloud 20') setDeprecatedProp('oc_current_user', () => OC.getCurrentUser().uid, 'use OC.getCurrentUser().uid instead, this will be removed in Nextcloud 20') setDeprecatedProp('oc_debug', () => OC.debug, 'use OC.debug instead, this will be removed in Nextcloud 20') @@ -124,9 +122,8 @@ setDeprecatedProp('oc_isadmin', OC.isUserAdmin, 'use OC.isUserAdmin() instead, t setDeprecatedProp('oc_requesttoken', () => getRequestToken(), 'use OC.requestToken instead, this will be removed in Nextcloud 20') setDeprecatedProp('oc_webroot', () => OC.webroot, 'use OC.getRootPath() instead, this will be removed in Nextcloud 20') setDeprecatedProp('OCDialogs', () => OC.dialogs, 'use OC.dialogs instead, this will be removed in Nextcloud 20') -window['OCP'] = OCP -window['OCA'] = OCA -window['escapeHTML'] = deprecate(escapeHTML, 'escapeHTML', 19) +window.OCP = OCP +window.OCA = OCA $.fn.select2 = deprecate($.fn.select2, 'select2', 19) /** |