Files
svgedit/editor/no-module-support-redirect.js
Brett Zamir 4a0889c7e5 - Enhancement: For anyone visiting the ES6 modules entrance file without ESM
support, redirect to non-modular vesion
- Build: Add comment not to edit xdomain editor directly
2018-10-24 10:56:07 +08:00

9 lines
388 B
JavaScript

// This file should only load if the user's browser doesn't support ESM
// This file will be stripped from the non-modular versions
// We only need to replace the first instance
location.href = location.href
.replace(/(xdomain-)?svg-editor-es\.html/, 'svg-editor.html')
.replace('openclipart-es.html', 'openclipart.html')
.replace('imagelib/index-es.html', 'imagelib/index.html');