mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-27 12:07:43 +02:00
only register handler for prod builds
This commit is contained in:
@@ -4,12 +4,14 @@ import { App } from "./app";
|
|||||||
import { Providers } from "./providers";
|
import { Providers } from "./providers";
|
||||||
|
|
||||||
// register nostr: protocol handler
|
// register nostr: protocol handler
|
||||||
|
if (import.meta.env.PROD) {
|
||||||
try {
|
try {
|
||||||
navigator.registerProtocolHandler("web+nostr", new URL("/l/%s", location.origin).toString());
|
navigator.registerProtocolHandler("web+nostr", new URL("/l/%s", location.origin).toString());
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log("Failed to register handler");
|
console.log("Failed to register handler");
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const element = document.getElementById("root");
|
const element = document.getElementById("root");
|
||||||
if (!element) throw new Error("missing mount point");
|
if (!element) throw new Error("missing mount point");
|
||||||
|
Reference in New Issue
Block a user