window.nostr.js 0.1.4 → 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 CHANGED
@@ -8,8 +8,8 @@ trailingComma: none
8
8
  useTabs: false
9
9
  bracketSpacing: false
10
10
  plugins:
11
- - prettier-plugin-tailwindcss
12
11
  - prettier-plugin-svelte
12
+ - prettier-plugin-tailwindcss
13
13
  overrides:
14
14
  - files: '*.svelte'
15
15
  options:
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-ubxn_Oc5.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-DyKAuhEP.js"></script>
8
8
  </head>
9
9
  <body
10
10
  style="