aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDarius Jahandarie <djahandarie@gmail.com>2023-11-12 11:15:10 +0900
committerGitHub <noreply@github.com>2023-11-12 11:15:10 +0900
commit784dcd93b02443bc253e3af43ad0586a1add39c5 (patch)
tree93f3e15603ec38faef01070475904c08d2e9280b /ext
parent9ab8f2753166209c8ce6a431b9c72be508d4ffd4 (diff)
parentf263e994c6eca2438eaff79cb22f1b48fe14b7b2 (diff)
Merge branch 'master' into replace-yomichan
Diffstat (limited to 'ext')
-rw-r--r--ext/js/pages/settings/backup-controller.js2
-rw-r--r--ext/js/script/dynamic-loader-sentinel.js3
-rw-r--r--ext/js/script/dynamic-loader.js3
3 files changed, 5 insertions, 3 deletions
diff --git a/ext/js/pages/settings/backup-controller.js b/ext/js/pages/settings/backup-controller.js
index 1ddefa51..2863c505 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 * as Dexie from '../../../lib/dexie.js';
+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/script/dynamic-loader-sentinel.js b/ext/js/script/dynamic-loader-sentinel.js
index cb03b0b9..3c06fc02 100644
--- a/ext/js/script/dynamic-loader-sentinel.js
+++ b/ext/js/script/dynamic-loader-sentinel.js
@@ -18,4 +18,5 @@
import {yomitan} from '../yomitan.js';
-yomitan.trigger('dynamicLoaderSentinel', {script: document.currentScript});
+
+yomitan.trigger('dynamicLoaderSentinel', {script: import.meta.url});
diff --git a/ext/js/script/dynamic-loader.js b/ext/js/script/dynamic-loader.js
index ec95ff03..2abc9e04 100644
--- a/ext/js/script/dynamic-loader.js
+++ b/ext/js/script/dynamic-loader.js
@@ -126,6 +126,7 @@ export const dynamicLoader = (() => {
if (node !== null) { continue; }
const script = document.createElement('script');
+ script.type = 'module';
script.async = false;
script.src = url;
parent.appendChild(script);
@@ -140,7 +141,7 @@ export const dynamicLoader = (() => {
const sentinelEventName = 'dynamicLoaderSentinel';
const sentinelEventCallback = (e) => {
- if (e.script !== script) { return; }
+ if (e.script !== script.src) { return; }
yomitan.off(sentinelEventName, sentinelEventCallback);
parent.removeChild(script);
resolve();