2019-05-23 11:03:04 -04:00
|
|
|
/**
|
2018-12-11 14:56:46 -05:00
|
|
|
* @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
|
|
|
|
|
*
|
2021-03-31 06:15:40 -04:00
|
|
|
* @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>
|
2018-12-11 14:56:46 -05:00
|
|
|
*
|
2022-01-11 11:18:11 -05:00
|
|
|
* @license AGPL-3.0-or-later
|
2018-12-11 14:56:46 -05:00
|
|
|
*
|
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU Affero General Public License as
|
|
|
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Affero General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU Affero General Public License
|
2021-03-31 06:15:40 -04:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*
|
2018-12-11 14:56:46 -05:00
|
|
|
*/
|
|
|
|
|
|
2023-03-23 02:38:34 -04:00
|
|
|
import 'core-js/stable/index.js'
|
|
|
|
|
import 'regenerator-runtime/runtime.js'
|
2018-12-11 14:56:46 -05:00
|
|
|
|
2019-05-10 07:38:11 -04:00
|
|
|
// If you remove the line below, tests won't pass
|
2019-09-25 12:19:42 -04:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
2021-03-27 05:37:22 -04:00
|
|
|
import OC from './OC/index.js'
|
2019-05-10 07:38:11 -04:00
|
|
|
|
2021-03-27 05:37:22 -04:00
|
|
|
import './globals.js'
|
|
|
|
|
import './jquery/index.js'
|
|
|
|
|
import { initCore } from './init.js'
|
2023-07-06 20:23:42 -04:00
|
|
|
import { registerAppsSlideToggle } from './OC/apps.js'
|
2023-08-10 08:25:46 -04:00
|
|
|
import { getRequestToken } from '@nextcloud/auth'
|
|
|
|
|
|
|
|
|
|
// eslint-disable-next-line camelcase
|
|
|
|
|
__webpack_nonce__ = btoa(getRequestToken())
|
2019-01-04 05:24:50 -05:00
|
|
|
|
2020-07-20 06:30:35 -04:00
|
|
|
window.addEventListener('DOMContentLoaded', function() {
|
2019-09-25 12:19:42 -04:00
|
|
|
initCore()
|
2023-06-25 05:46:53 -04:00
|
|
|
registerAppsSlideToggle()
|
2019-10-21 15:36:17 -04:00
|
|
|
|
|
|
|
|
// fallback to hashchange when no history support
|
|
|
|
|
if (window.history.pushState) {
|
|
|
|
|
window.onpopstate = _.bind(OC.Util.History._onPopState, OC.Util.History)
|
|
|
|
|
} else {
|
2023-07-06 20:23:42 -04:00
|
|
|
window.onhashchange = _.bind(OC.Util.History._onPopState, OC.Util.History)
|
2019-10-21 15:36:17 -04:00
|
|
|
}
|
2019-09-25 12:19:42 -04:00
|
|
|
})
|