Skip to content

Commit

Permalink
Todo, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Heckel committed Oct 25, 2021
1 parent 1321bf1 commit b72afb1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ To build releases, I use [GoReleaser](https://goreleaser.com/). If you have that

## TODO
- add HTTPS
- make limits configurable
- limit max number of subscriptions

## Contributing
I welcome any and all contributions. Just create a PR or an issue.
Expand Down
14 changes: 7 additions & 7 deletions server/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
<meta name="HandheldFriendly" content="true">

<!-- Mobile browsers, background color -->
<meta name="theme-color" content="#004c79">
<meta name="msapplication-navbutton-color" content="#004c79">
<meta name="apple-mobile-web-app-status-bar-style" content="#004c79">
<meta name="theme-color" content="#39005a">
<meta name="msapplication-navbutton-color" content="#39005a">
<meta name="apple-mobile-web-app-status-bar-style" content="#39005a">

<!-- Favicon, see favicon.io -->
<link rel="icon" type="image/png" href="static/img/favicon.png">
Expand Down Expand Up @@ -56,7 +56,7 @@ <h3>Subscribe via web</h3>
<form id="subscribeForm">
<p>
<label for="topicField">Subscribe to topic:</label>
<input type="text" id="topicField" placeholder="Letters, numbers, _ and -" pattern="[-_A-Za-z]{1,64}" autofocus />
<input type="text" id="topicField" placeholder="Letters, numbers, _ and -" pattern="[-_A-Za-z]{1,64}" />
<input type="submit" id="subscribeButton" value="Subscribe" />
</p>
</form>
Expand All @@ -83,7 +83,7 @@ <h3>Subscribe via your app, or via the CLI</h3>
notifications like this (see <a href="https://github.com/binwiederhier/ntfy/tree/main/examples">full example</a>):
</p>
<code>
const eventSource = new EventSource(`https://ntfy.sh/mytopic/sse`);<br/>
const eventSource = new EventSource('https://ntfy.sh/mytopic/sse');<br/>
eventSource.onmessage = (e) => {<br/>
&nbsp;&nbsp;// Do something with e.data<br/>
};
Expand All @@ -100,9 +100,9 @@ <h2>Publishing messages</h2>
Here's an example in JS with <tt>fetch()</tt> (see <a href="https://github.com/binwiederhier/ntfy/tree/main/examples">full example</a>):
</p>
<code>
fetch(`https://ntfy.sh/mytopic`, {<br/>
fetch('https://ntfy.sh/mytopic', {<br/>
&nbsp;&nbsp;method: 'POST', // PUT works too<br/>
&nbsp;&nbsp;body: `Hello from the other side.`<br/>
&nbsp;&nbsp;body: 'Hello from the other side.'<br/>
})
</code>
<p>
Expand Down

0 comments on commit b72afb1

Please sign in to comment.