overleaf/services/web/frontend/js/cdn-load-test.js
Jakob Ackermann 4cecc6383a Merge pull request #5361 from overleaf/jpa-fix-cdn-load-test
[web] rework the loading process for the CDN load test

GitOrigin-RevId: dd14ca29668e88944457e03ffd8c921e2ce93929
2021-10-06 08:03:22 +00:00

9 lines
345 B
JavaScript

import { captureMessage } from './infrastructure/error-reporter'
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'
}