mirror of
https://github.com/zotero/zotero.git
synced 2026-09-29 01:41:24 +00:00
ESMify: Assume Zotero ESMS are/will be renamed to .mjs
This commit is contained in:
parent
54a35ff844
commit
b2bd862271
1 changed files with 6 additions and 2 deletions
|
|
@ -33,8 +33,12 @@ function generateESMURIMap(jsm_map) {
|
|||
}
|
||||
|
||||
function isESMifiedSlow(resourceURI) {
|
||||
if (!resourceURI.includes('/zotero/') && resourceURI.endsWith('.jsm')) {
|
||||
return { result: true, jsms: [resourceURI.replace('.jsm', '.sys.mjs')] };
|
||||
if (resourceURI.endsWith('.jsm')) {
|
||||
if (resourceURI.includes('/zotero/')) {
|
||||
return { result: true, jsms: [resourceURI.replace('.jsm', '.mjs')] };
|
||||
} else {
|
||||
return { result: true, jsms: [resourceURI.replace('.jsm', '.sys.mjs')] };
|
||||
}
|
||||
}
|
||||
|
||||
if (!(resourceURI in uri_map)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue