diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-12-18 23:22:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-19 04:22:05 +0000 |
commit | 1d268edcc3efce723954bcaa7dd376f0352c1a32 (patch) | |
tree | 8ca08980837206dc5d309fa20f2d29fbd336a498 /ext/js/app/popup.js | |
parent | 5a3d23e7c20e6869b2ae10d5bc478c5552bc41e8 (diff) |
Remove dynamic-loader scripts, simplify script loading (#383)
Diffstat (limited to 'ext/js/app/popup.js')
-rw-r--r-- | ext/js/app/popup.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/js/app/popup.js b/ext/js/app/popup.js index a2aa204a..45604a55 100644 --- a/ext/js/app/popup.js +++ b/ext/js/app/popup.js @@ -20,7 +20,7 @@ import {FrameClient} from '../comm/frame-client.js'; import {DynamicProperty, EventDispatcher, EventListenerCollection, deepEqual} from '../core.js'; import {ExtensionError} from '../core/extension-error.js'; import {DocumentUtil} from '../dom/document-util.js'; -import {dynamicLoader} from '../script/dynamic-loader.js'; +import {loadStyle} from '../dom/style-util.js'; import {yomitan} from '../yomitan.js'; import {ThemeController} from './theme-controller.js'; @@ -359,7 +359,7 @@ export class Popup extends EventDispatcher { useWebExtensionApi = false; parentNode = this._shadow; } - const node = await dynamicLoader.loadStyle('yomitan-popup-outer-user-stylesheet', 'code', css, useWebExtensionApi, parentNode); + const node = await loadStyle('yomitan-popup-outer-user-stylesheet', 'code', css, useWebExtensionApi, parentNode); /** @type {import('popup').CustomOuterCssChangedEvent} */ const event = {node, useWebExtensionApi, inShadow}; this.trigger('customOuterCssChanged', event); @@ -574,7 +574,7 @@ export class Popup extends EventDispatcher { useWebExtensionApi = false; parentNode = this._shadow; } - await dynamicLoader.loadStyle('yomitan-popup-outer-stylesheet', fileType, '/css/popup-outer.css', useWebExtensionApi, parentNode); + await loadStyle('yomitan-popup-outer-stylesheet', fileType, '/css/popup-outer.css', useWebExtensionApi, parentNode); } /** |