aboutsummaryrefslogtreecommitdiff
path: root/extension/src/entries/contentScript/primary/main.js
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-11-22 15:07:08 -0500
committerLibravatar vnugent <public@vaughnnugent.com>2023-11-22 15:07:08 -0500
commite272adcc3f32e31fe7668551453b8e34bc823c3e (patch)
tree680c695184ddbc27227578afa9f169d98a69f55a /extension/src/entries/contentScript/primary/main.js
parent2ba94602a87c87b47f566745bdab40ce75e0e879 (diff)
feature and internal api polish
Diffstat (limited to 'extension/src/entries/contentScript/primary/main.js')
-rw-r--r--extension/src/entries/contentScript/primary/main.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/extension/src/entries/contentScript/primary/main.js b/extension/src/entries/contentScript/primary/main.js
index e73923d..dbfa07b 100644
--- a/extension/src/entries/contentScript/primary/main.js
+++ b/extension/src/entries/contentScript/primary/main.js
@@ -13,7 +13,7 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-
+import { runtime } from "webextension-polyfill";
import { createApp } from "vue";
import { createPinia } from 'pinia';
import { useBackgroundPiniaPlugin, identityPlugin, originPlugin } from '../../store'
@@ -25,7 +25,7 @@ import '@fontsource/noto-sans-masaram-gondi'
//We need inline styles to inject into the shadow dom
import tw from "~/assets/all.scss?inline";
import localStyle from './style.scss?inline'
-import { onLoad } from "../nostr-shim";
+import { onLoad } from "../util";
import { defer } from "lodash";
/* FONT AWESOME CONFIG */
@@ -35,6 +35,10 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
library.add(faCircleInfo)
+//The extension name, same as nostr-provider script path
+const ext = '@vnuge/nvault-extension'
+const scriptUrl = runtime.getURL('src/entries/nostr-provider.js')
+
renderContent([], (appRoot, shadowRoot) => {
//Create the background feature wiring
@@ -62,5 +66,5 @@ renderContent([], (appRoot, shadowRoot) => {
.mount(appRoot);
//Load the nostr shim
- defer(onLoad)
+ defer(() => onLoad(ext, scriptUrl))
}); \ No newline at end of file