window.nostr.js 0.1.3 → 0.2.0
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.
- package/.prettierrc.yaml +1 -1
- package/README.md +15 -0
- package/dist/index.html +1 -1
- package/dist/window.nostr.js +13 -5
- package/package.json +1 -1
- package/src/App.svelte +282 -137
- package/src/Spinner.svelte +3 -3
- package/src/app.css +1 -0
- package/tailwind.config.js +10 -1
package/.prettierrc.yaml
CHANGED
package/README.md
CHANGED
|
@@ -8,6 +8,21 @@ It adds a small floating button on the side of the window that users can use to
|
|
|
8
8
|
|
|
9
9
|
Include `<script src="https://unpkg.com/window.nostr.js/dist/window.nostr.js"></script>` in your HTML and proceed to use [`window.nostr`](https://nips.nostr.com/7) normally.
|
|
10
10
|
|
|
11
|
+
## Customization
|
|
12
|
+
The script supports some optional configurations to personalize the design:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
<script>
|
|
16
|
+
window.wnjParams = {
|
|
17
|
+
position: 'bottom',
|
|
18
|
+
// The only accepted value is 'bottom', default is top
|
|
19
|
+
accent: 'green',
|
|
20
|
+
// Supported values: cyan (default), green, purple, red, orange, neutral, stone
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
<script src="https://unpkg.com/window.nostr.js/dist/window.nostr.js"></script>
|
|
24
|
+
```
|
|
25
|
+
|
|
11
26
|
## Bookmarklet
|
|
12
27
|
|
|
13
28
|
If a website has opted to not include this, but you like it, you can still use it on the website. Just add this to your browser bookmarks and click on it to load the widget on any website:
|
package/dist/index.html
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>dev</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-DyKAuhEP.js"></script>
|
|
8
8
|
</head>
|
|
9
9
|
<body
|
|
10
10
|
style="
|