Skip to content

Commit 98ddb81

Browse files
pulsejetnextcloud-command
authored andcommitted
Make unsupported browser check asynchronous
This check is very expensive, and will pass almost 100% of the time. Related #36728 Depends on #38329 Signed-off-by: Varun Patil <[email protected]> Signed-off-by: nextcloud-command <[email protected]>
1 parent 8cca865 commit 98ddb81

7 files changed

+75
-50
lines changed

core/src/unsupported-browser-redirect.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
*/
2121

22-
import { testSupportedBrowser } from './utils/RedirectUnsupportedBrowsers.js'
23-
2422
if (!window.TESTING && !OC?.config?.no_unsupported_browser_warning) {
25-
testSupportedBrowser()
23+
window.addEventListener('DOMContentLoaded', async function() {
24+
const { testSupportedBrowser } = await import('./utils/RedirectUnsupportedBrowsers.js')
25+
testSupportedBrowser()
26+
})
2627
}

dist/9551-9551.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/9551-9551.js.LICENSE.txt

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/**
2+
* @copyright 2019 Christoph Wurst <[email protected]>
3+
*
4+
* @author Christoph Wurst <[email protected]>
5+
*
6+
* @license AGPL-3.0-or-later
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Affero General Public License as
10+
* published by the Free Software Foundation, either version 3 of the
11+
* License, or (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Affero General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Affero General Public License
19+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
23+
/**
24+
* @copyright 2021 John Molakvoæ <[email protected]>
25+
*
26+
* @author John Molakvoæ <[email protected]>
27+
*
28+
* @license AGPL-3.0-or-later
29+
*
30+
* This program is free software: you can redistribute it and/or modify
31+
* it under the terms of the GNU Affero General Public License as
32+
* published by the Free Software Foundation, either version 3 of the
33+
* License, or (at your option) any later version.
34+
*
35+
* This program is distributed in the hope that it will be useful,
36+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
37+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38+
* GNU Affero General Public License for more details.
39+
*
40+
* You should have received a copy of the GNU Affero General Public License
41+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
42+
*
43+
*/
44+
45+
/**
46+
* @copyright 2022 John Molakvoæ <[email protected]>
47+
*
48+
* @author John Molakvoæ <[email protected]>
49+
*
50+
* @license AGPL-3.0-or-later
51+
*
52+
* This program is free software: you can redistribute it and/or modify
53+
* it under the terms of the GNU Affero General Public License as
54+
* published by the Free Software Foundation, either version 3 of the
55+
* License, or (at your option) any later version.
56+
*
57+
* This program is distributed in the hope that it will be useful,
58+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
59+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60+
* GNU Affero General Public License for more details.
61+
*
62+
* You should have received a copy of the GNU Affero General Public License
63+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
64+
*/

dist/9551-9551.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-unsupported-browser-redirect.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core-unsupported-browser-redirect.js.LICENSE.txt

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
1-
/**
2-
* @copyright 2019 Christoph Wurst <[email protected]>
3-
*
4-
* @author Christoph Wurst <[email protected]>
5-
*
6-
* @license AGPL-3.0-or-later
7-
*
8-
* This program is free software: you can redistribute it and/or modify
9-
* it under the terms of the GNU Affero General Public License as
10-
* published by the Free Software Foundation, either version 3 of the
11-
* License, or (at your option) any later version.
12-
*
13-
* This program is distributed in the hope that it will be useful,
14-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16-
* GNU Affero General Public License for more details.
17-
*
18-
* You should have received a copy of the GNU Affero General Public License
19-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20-
*
21-
*/
22-
23-
/**
24-
* @copyright 2021 John Molakvoæ <[email protected]>
25-
*
26-
* @author John Molakvoæ <[email protected]>
27-
*
28-
* @license AGPL-3.0-or-later
29-
*
30-
* This program is free software: you can redistribute it and/or modify
31-
* it under the terms of the GNU Affero General Public License as
32-
* published by the Free Software Foundation, either version 3 of the
33-
* License, or (at your option) any later version.
34-
*
35-
* This program is distributed in the hope that it will be useful,
36-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
37-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38-
* GNU Affero General Public License for more details.
39-
*
40-
* You should have received a copy of the GNU Affero General Public License
41-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
42-
*
43-
*/
44-
451
/**
462
* @copyright 2022 John Molakvoæ <[email protected]>
473
*

dist/core-unsupported-browser-redirect.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)