browser-extension-settings 0.2.9 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/settings.ts +4 -1
  2. package/package.json +1 -1
package/lib/settings.ts CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  parseInt10,
15
15
  removeEventListener,
16
16
  runWhenBodyExists,
17
+ runWhenHeadExists,
17
18
  } from "browser-extension-utils"
18
19
  import styleText from "data-text:./style.scss"
19
20
  import { createSwitchOption } from "./switch"
@@ -514,7 +515,9 @@ export const initSettings = async (options: SettingsOptions) => {
514
515
  })
515
516
 
516
517
  settings = await getSettings()
517
- addStyle(getSettingsStyle())
518
+ runWhenHeadExists(() => {
519
+ addStyle(getSettingsStyle())
520
+ })
518
521
  runWhenBodyExists(() => {
519
522
  initExtensionList()
520
523
  addSideMenu()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-extension-settings",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "Settings module for developing browser extensions and userscripts",
5
5
  "type": "module",
6
6
  "main": "./lib/index.ts",