mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-05 01:26:55 +00:00
Merge pull request #5361 from overleaf/jpa-fix-cdn-load-test
[web] rework the loading process for the CDN load test GitOrigin-RevId: dd14ca29668e88944457e03ffd8c921e2ce93929
This commit is contained in:
parent
c2a2a9b0d8
commit
4cecc6383a
5 changed files with 9 additions and 8 deletions
|
@ -135,5 +135,3 @@ html(
|
|||
//- Set query param, server will not set CDN url
|
||||
window.location.search += "&nocdn=true";
|
||||
}
|
||||
if hasFeature('saas')
|
||||
script(type="text/javascript", nonce=scriptNonce, src=buildJsPath('cdn-load-test.js'))
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import { captureMessage } from './infrastructure/error-reporter'
|
||||
|
||||
var cdnLoadTest = document.createElement('img')
|
||||
cdnLoadTest.addEventListener('error', function (event) {
|
||||
captureMessage('CDN test image load error (cdn.overleaf.net)')
|
||||
})
|
||||
cdnLoadTest.src = 'https://cdn.overleaf.net/img/1p.gif'
|
||||
if (window.ExposedSettings.isOverleaf) {
|
||||
const cdnLoadTest = document.createElement('img')
|
||||
cdnLoadTest.addEventListener('error', function () {
|
||||
captureMessage('CDN test image load error (cdn.overleaf.net)')
|
||||
})
|
||||
cdnLoadTest.src = 'https://cdn.overleaf.net/img/1p.gif'
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ import './services/validateCaptcha'
|
|||
import './services/validateCaptchaV3'
|
||||
import './filters/formatDate'
|
||||
import '../../modules/modules-main.js'
|
||||
import './cdn-load-test'
|
||||
angular.module('SharelatexApp').config(function ($locationProvider) {
|
||||
try {
|
||||
return $locationProvider.html5Mode({
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import './utils/webpack-public-path'
|
||||
import 'jquery'
|
||||
import 'bootstrap'
|
||||
import './cdn-load-test'
|
||||
import './features/form-helpers/hydrate-form'
|
||||
import './features/link-helpers/slow-link'
|
||||
import './features/bookmarkable-tab'
|
||||
|
|
|
@ -12,7 +12,6 @@ const entryPoints = {
|
|||
serviceWorker: './frontend/js/serviceWorker.js',
|
||||
main: './frontend/js/main.js',
|
||||
ide: './frontend/js/ide.js',
|
||||
'cdn-load-test': './frontend/js/cdn-load-test.js',
|
||||
marketing: './frontend/js/marketing.js',
|
||||
style: './frontend/stylesheets/style.less',
|
||||
'ieee-style': './frontend/stylesheets/ieee-style.less',
|
||||
|
|
Loading…
Reference in a new issue