aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 22:07:28 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 23:01:14 -0500
commit58ae2ab871591eea82895b1ab2a18753521eab1f (patch)
treea0a26dd8c80f52ca8a1532b3652384cafae33106
parent14d12f6ba20b837a04c638b935773f3120e194ff (diff)
Revert "Use import map"
-rw-r--r--dev/jsconfig.json1
-rw-r--r--ext/action-popup.html8
-rw-r--r--ext/background.html8
-rw-r--r--ext/info.html8
-rw-r--r--ext/issues.html8
-rw-r--r--ext/js/background/backend.js2
-rw-r--r--ext/js/background/offscreen.js2
-rw-r--r--ext/js/display/search-display-controller.js2
-rw-r--r--ext/js/display/search-main.js2
-rw-r--r--ext/js/dom/simple-dom-parser.js2
-rw-r--r--ext/js/language/dictionary-importer.js4
-rw-r--r--ext/js/pages/settings/backup-controller.js2
-rw-r--r--ext/js/pages/settings/popup-preview-frame.js2
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js2
-rw-r--r--ext/js/templates/sandbox/template-renderer-media-provider.js2
-rw-r--r--ext/js/templates/sandbox/template-renderer.js2
-rw-r--r--ext/legal.html8
-rw-r--r--ext/offscreen.html8
-rw-r--r--ext/permissions.html8
-rw-r--r--ext/popup-preview.html8
-rw-r--r--ext/popup.html8
-rw-r--r--ext/search.html8
-rw-r--r--ext/settings.html8
-rw-r--r--ext/template-renderer.html8
-rw-r--r--ext/welcome.html8
-rw-r--r--jsconfig.json1
-rw-r--r--test/japanese-util.test.js2
-rw-r--r--test/jsconfig.json1
28 files changed, 13 insertions, 120 deletions
diff --git a/dev/jsconfig.json b/dev/jsconfig.json
index d4efe694..5b1c450c 100644
--- a/dev/jsconfig.json
+++ b/dev/jsconfig.json
@@ -12,7 +12,6 @@
"skipLibCheck": false,
"baseUrl": ".",
"paths": {
- "zip.js": ["@zip.js/zip.js"],
"anki-templates": ["../types/ext/anki-templates"],
"anki-templates-internal": ["../types/ext/anki-templates-internal"],
"cache-map": ["../types/ext/cache-map"],
diff --git a/ext/action-popup.html b/ext/action-popup.html
index 5c6bfce4..b60e7055 100644
--- a/ext/action-popup.html
+++ b/ext/action-popup.html
@@ -12,14 +12,6 @@
<link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
<link rel="stylesheet" type="text/css" href="/css/action-popup.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/background.html b/ext/background.html
index 6f9ee5f6..dc88f397 100644
--- a/ext/background.html
+++ b/ext/background.html
@@ -12,14 +12,6 @@
<link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
<link rel="stylesheet" type="text/css" href="/css/background.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/info.html b/ext/info.html
index 9e71ffd4..cb80053d 100644
--- a/ext/info.html
+++ b/ext/info.html
@@ -13,14 +13,6 @@
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
<link rel="stylesheet" type="text/css" href="/css/material.css">
<link rel="stylesheet" type="text/css" href="/css/settings.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/issues.html b/ext/issues.html
index c75683dd..904fbf16 100644
--- a/ext/issues.html
+++ b/ext/issues.html
@@ -13,14 +13,6 @@
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
<link rel="stylesheet" type="text/css" href="/css/material.css">
<link rel="stylesheet" type="text/css" href="/css/settings.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js
index f1a47e7f..3eefed53 100644
--- a/ext/js/background/backend.js
+++ b/ext/js/background/backend.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import * as wanakana from 'wanakana';
+import * as wanakana from '../../lib/wanakana.js';
import {AccessibilityController} from '../accessibility/accessibility-controller.js';
import {AnkiConnect} from '../comm/anki-connect.js';
import {ClipboardMonitor} from '../comm/clipboard-monitor.js';
diff --git a/ext/js/background/offscreen.js b/ext/js/background/offscreen.js
index 8da661ad..4b57514d 100644
--- a/ext/js/background/offscreen.js
+++ b/ext/js/background/offscreen.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import * as wanakana from 'wanakana';
+import * as wanakana from '../../lib/wanakana.js';
import {ClipboardReader} from '../comm/clipboard-reader.js';
import {invokeMessageHandler} from '../core.js';
import {ArrayBufferUtil} from '../data/sandbox/array-buffer-util.js';
diff --git a/ext/js/display/search-display-controller.js b/ext/js/display/search-display-controller.js
index 98a4666b..2778c4cd 100644
--- a/ext/js/display/search-display-controller.js
+++ b/ext/js/display/search-display-controller.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import * as wanakana from 'wanakana';
+import * as wanakana from '../../lib/wanakana.js';
import {ClipboardMonitor} from '../comm/clipboard-monitor.js';
import {EventListenerCollection, invokeMessageHandler} from '../core.js';
import {yomitan} from '../yomitan.js';
diff --git a/ext/js/display/search-main.js b/ext/js/display/search-main.js
index c1445e37..c20cc135 100644
--- a/ext/js/display/search-main.js
+++ b/ext/js/display/search-main.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import * as wanakana from 'wanakana';
+import * as wanakana from '../../lib/wanakana.js';
import {log} from '../core.js';
import {DocumentFocusController} from '../dom/document-focus-controller.js';
import {HotkeyHandler} from '../input/hotkey-handler.js';
diff --git a/ext/js/dom/simple-dom-parser.js b/ext/js/dom/simple-dom-parser.js
index 7ee28d51..a1f63890 100644
--- a/ext/js/dom/simple-dom-parser.js
+++ b/ext/js/dom/simple-dom-parser.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import * as parse5 from 'parse5';
+import * as parse5 from '../../lib/parse5.js';
/**
* @augments import('simple-dom-parser').ISimpleDomParser
diff --git a/ext/js/language/dictionary-importer.js b/ext/js/language/dictionary-importer.js
index 5a4d7257..115e0726 100644
--- a/ext/js/language/dictionary-importer.js
+++ b/ext/js/language/dictionary-importer.js
@@ -16,14 +16,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import * as ajvSchemas0 from 'validate-schemas';
+import * as ajvSchemas0 from '../../lib/validate-schemas.js';
import {
BlobWriter as BlobWriter0,
TextWriter as TextWriter0,
Uint8ArrayReader as Uint8ArrayReader0,
ZipReader as ZipReader0,
configure
-} from 'zip.js';
+} from '../../lib/zip.js';
import {stringReverse} from '../core.js';
import {MediaUtil} from '../media/media-util.js';
import {ExtensionError} from '../core/extension-error.js';
diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js
index aeff2a97..52c5f418 100644
--- a/ext/js/pages/settings/backup-controller.js
+++ b/ext/js/pages/settings/backup-controller.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import {Dexie} from 'dexie';
+import {Dexie} from '../../../lib/dexie.js';
import {isObject, log} from '../../core.js';
import {OptionsUtil} from '../../data/options-util.js';
import {ArrayBufferUtil} from '../../data/sandbox/array-buffer-util.js';
diff --git a/ext/js/pages/settings/popup-preview-frame.js b/ext/js/pages/settings/popup-preview-frame.js
index dab21f4d..60d264fa 100644
--- a/ext/js/pages/settings/popup-preview-frame.js
+++ b/ext/js/pages/settings/popup-preview-frame.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import * as wanakana from 'wanakana';
+import * as wanakana from '../../../lib/wanakana.js';
import {Frontend} from '../../app/frontend.js';
import {TextSourceRange} from '../../dom/text-source-range.js';
import {yomitan} from '../../yomitan.js';
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index b0dc8223..9f4bf6ff 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import {Handlebars} from 'handlebars';
+import {Handlebars} from '../../../lib/handlebars.js';
import {AnkiNoteDataCreator} from '../../data/sandbox/anki-note-data-creator.js';
import {PronunciationGenerator} from '../../display/sandbox/pronunciation-generator.js';
import {StructuredContentGenerator} from '../../display/sandbox/structured-content-generator.js';
diff --git a/ext/js/templates/sandbox/template-renderer-media-provider.js b/ext/js/templates/sandbox/template-renderer-media-provider.js
index 23f334e1..d8a0a16d 100644
--- a/ext/js/templates/sandbox/template-renderer-media-provider.js
+++ b/ext/js/templates/sandbox/template-renderer-media-provider.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import {Handlebars} from 'handlebars';
+import {Handlebars} from '../../../lib/handlebars.js';
export class TemplateRendererMediaProvider {
constructor() {
diff --git a/ext/js/templates/sandbox/template-renderer.js b/ext/js/templates/sandbox/template-renderer.js
index d4aebd64..fe240b5f 100644
--- a/ext/js/templates/sandbox/template-renderer.js
+++ b/ext/js/templates/sandbox/template-renderer.js
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import {Handlebars} from 'handlebars';
+import {Handlebars} from '../../../lib/handlebars.js';
import {ExtensionError} from '../../core/extension-error.js';
export class TemplateRenderer {
diff --git a/ext/legal.html b/ext/legal.html
index b853f3e8..94912c7e 100644
--- a/ext/legal.html
+++ b/ext/legal.html
@@ -14,14 +14,6 @@
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
<link rel="stylesheet" type="text/css" href="/css/material.css">
<link rel="stylesheet" type="text/css" href="/css/settings.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/offscreen.html b/ext/offscreen.html
index cfab53ee..afb7eb44 100644
--- a/ext/offscreen.html
+++ b/ext/offscreen.html
@@ -12,14 +12,6 @@
<link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
<link rel="stylesheet" type="text/css" href="/css/background.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/permissions.html b/ext/permissions.html
index 7baff14e..61b0d363 100644
--- a/ext/permissions.html
+++ b/ext/permissions.html
@@ -14,14 +14,6 @@
<link rel="stylesheet" type="text/css" href="/css/material.css">
<link rel="stylesheet" type="text/css" href="/css/settings.css">
<link rel="stylesheet" type="text/css" href="/css/permissions.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/popup-preview.html b/ext/popup-preview.html
index 7bd54470..15810242 100644
--- a/ext/popup-preview.html
+++ b/ext/popup-preview.html
@@ -13,14 +13,6 @@
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
<link rel="stylesheet" type="text/css" href="/css/popup-preview.css">
<link rel="stylesheet" type="text/css" href="/css/popup-outer.css" id="popup-outer-css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/popup.html b/ext/popup.html
index 6bc8d690..30e8a8c0 100644
--- a/ext/popup.html
+++ b/ext/popup.html
@@ -15,14 +15,6 @@
<link rel="stylesheet" type="text/css" href="/css/display.css">
<link rel="stylesheet" type="text/css" href="/css/display-pronunciation.css">
<link rel="stylesheet" type="text/css" href="/css/structured-content.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/search.html b/ext/search.html
index 377a966a..8c595cc4 100644
--- a/ext/search.html
+++ b/ext/search.html
@@ -16,14 +16,6 @@
<link rel="stylesheet" type="text/css" href="/css/display-pronunciation.css">
<link rel="stylesheet" type="text/css" href="/css/structured-content.css">
<link rel="stylesheet" type="text/css" href="/css/search.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/settings.html b/ext/settings.html
index 276a7222..346cc1d7 100644
--- a/ext/settings.html
+++ b/ext/settings.html
@@ -14,14 +14,6 @@
<link rel="stylesheet" type="text/css" href="/css/material.css">
<link rel="stylesheet" type="text/css" href="/css/settings.css">
<link rel="stylesheet" type="text/css" href="/css/display-pronunciation.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/template-renderer.html b/ext/template-renderer.html
index d1747e99..116f1a0c 100644
--- a/ext/template-renderer.html
+++ b/ext/template-renderer.html
@@ -11,14 +11,6 @@
<link rel="icon" type="image/png" href="/images/icon48.png" sizes="48x48">
<link rel="icon" type="image/png" href="/images/icon64.png" sizes="64x64">
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/ext/welcome.html b/ext/welcome.html
index 355bbc5f..40639881 100644
--- a/ext/welcome.html
+++ b/ext/welcome.html
@@ -13,14 +13,6 @@
<link rel="icon" type="image/png" href="/images/icon128.png" sizes="128x128">
<link rel="stylesheet" type="text/css" href="/css/material.css">
<link rel="stylesheet" type="text/css" href="/css/settings.css">
- <script type="importmap">{"imports":{
-"dexie": "./lib/dexie.js",
-"handlebars": "./lib/handlebars.js",
-"parse5": "./lib/parse5.js",
-"wanakana": "./lib/wanakana.js",
-"validate-schemas": "./lib/validate-schemas.js",
-"zip.js": "./lib/zip.js"
-}}</script>
</head>
<body>
diff --git a/jsconfig.json b/jsconfig.json
index 4f316174..0f780ead 100644
--- a/jsconfig.json
+++ b/jsconfig.json
@@ -12,7 +12,6 @@
"skipLibCheck": false,
"baseUrl": ".",
"paths": {
- "zip.js": ["@zip.js/zip.js"],
"*": ["./types/ext/*"]
},
"types": [
diff --git a/test/japanese-util.test.js b/test/japanese-util.test.js
index ae5b1a16..47da4ccb 100644
--- a/test/japanese-util.test.js
+++ b/test/japanese-util.test.js
@@ -16,10 +16,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import * as wanakana from 'wanakana';
import {expect, test} from 'vitest';
import {TextSourceMap} from '../ext/js/general/text-source-map.js';
import {JapaneseUtil} from '../ext/js/language/sandbox/japanese-util.js';
+import * as wanakana from '../ext/lib/wanakana.js';
const jp = new JapaneseUtil(wanakana);
diff --git a/test/jsconfig.json b/test/jsconfig.json
index 934aab81..2461fda9 100644
--- a/test/jsconfig.json
+++ b/test/jsconfig.json
@@ -12,7 +12,6 @@
"skipLibCheck": false,
"baseUrl": ".",
"paths": {
- "zip.js": ["@zip.js/zip.js"],
"*": ["../types/ext/*"],
"dev/*": ["../types/dev/*"],
"test/*": ["../types/test/*"]