-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
273 lines (259 loc) · 15.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="google-site-verification" content="jMI5QEtL8Vn2X_7NbwabbhE46QLyibe9ajlRY1BBUNc" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@yaireo/[email protected]/dist/tagify.css" integrity="sha256-HBjaa1BluwfN/QbPQoYzib9ealrwYFHMNr5FwgoqEYg=" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link rel="stylesheet" href="sticky-footer.css">
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["disableCookies"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//matomo.conversodromo.com.ar/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '1']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="//matomo.conversodromo.com.ar/matomo.php?idsite=1&rec=1" style="border:0;" alt="" /></p></noscript>
<!-- End Matomo Code -->
<title>Subscribe Hypothesis annotations</title>
</head>
<body onload="addOneEach()">
<div class="container-fluid">
<div class="text-center">
<h2>Subscribe to <a href="https://web.hypothes.is/" target="_blank">Hypothesis<a> web annotations</h2>
<p class="lead">
Do you want to know when someone annotates your webpages? Do you want to follow somebody's annotations?<br>
You have come to the right place.
</p>
</div>
<div class="row">
<div class="col-md pb-2">
<h3>Instructions</h3>
<p>
Fill in the fields to narrow your search.<br>
Within each field you may enter one or more optional terms: they are combined with an OR operator.<br>
Your target annotations must match all fields filled in: they are combined with an AND operator.<br>
Fields left blank will be ignored.<br>
For non-public annotations, see judell's <a href="https://github.com/judell/h_notify" target="_blank">notify</a>.
</p>
<div class="card">
<div class="card-header">
Example 1
</div>
<div class="card-body">
<p class="card-text">
Notify me when anyone annotates the English Wikipedia, anywhere:
</p>
<p class="card-text">
<b>URIs: </b>https://en.wikipedia.org/*
</p>
</div>
</div><br>
<div class="card">
<div class="card-header">
Example 2
</div>
<div class="card-body">
<p class="card-text">
Notify me when users Alice or Bob annotate an article in the Hypothesis blog:
</p>
<p class="card-text">
<b>URIs: </b>web.hypothes.is/blog/*<br>
<b>Users: </b>Alice, Bob
</p>
</div>
</div>
</div>
<div class="col-md pb-2">
<h3>Narrow your search</h3>
<form id='input'>
<div class="form-group">
<!-- do not allow spaces -->
<label for="uris">URIs</label>
<input type="text" class="form-control" id="uris" placeholder="uri">
<small id="uriHelp" class="form-text text-muted">
Wildcards * for any character sequence and _ for any single character are <a href="https://h.readthedocs.io/en/latest/api-reference/#tag/annotations/paths/~1search/get" target="_blank">only permitted</a> in the path and query parts of the URI.</small>
</div>
<div class="form-group">
<!-- do not allow spaces -->
<label for="users">Users</label>
<input type="text" class="form-control" id="users" placeholder="username">
<small id="userHelp" class="form-text text-muted">
Usernames may only have letters, numbers, periods or underscores.</small>
</div>
<div class="form-group">
<!-- do not allow spaces -->
<label for="groups">Group</label>
<input type="text" class="form-control" id="groups" placeholder="group-id">
<small id="groupHelp" class="form-text text-muted">
Only one group allowed. Find Group ID in the group's URL. Only <a href="https://web.hypothes.is/help/annotating-with-groups/" target="_blank">public groups</a> (e.g., <a href="https://hypothes.is/groups/ZLx677oM/climate-feedback" target="_blank">"Climate Feedback"</a>). For private groups see judell's <a href="https://github.com/judell/h_notify" target="_blank">notify</a>.</small>
</div>
<div class="form-group">
<label>Any (URI, quote, content or tags)</label><br>
<small id="anyHelp" class="form-text text-muted">
Use full words ("word" doesn't match "words").
Tag search is <a href="https://hyp.is/o9yIjpb-EeqncC8B74lb0g/h.readthedocs.io/en/latest/api-reference/" target="_blank">not exact</a> (i.e., "web" matches "web annotation" too).</small>
<div class="input-group" style="display:none">
<input type="text" class="form-control" name="anys" disabled>
<div class="input-group-append">
<button class="btn btn-danger" type="button" onclick="del(this)">
<i class="fa fa-remove"></i>
</button>
</div>
</div>
<button id="addAny" type="button" class="btn btn-success btn-block" onclick="add(this)">
<i class="fa fa-plus"></i>
</button>
</div>
<p>
<a class="btn btn-secondary" data-toggle="collapse" href="#more" role="button" aria-expanded="false" aria-controls="more">
More
</a>
</p>
<div class="collapse" id="more">
<div class="card card-body">
<div class="form-group">
<label>Quote</label><br>
<small id="quoteHelp" class="form-text text-muted">
Full words only ("word" doesn't match "words"). No spaces.</small>
<div class="input-group" style="display:none">
<input type="text" class="form-control" name="quotes" disabled delimiters="/, /">
<div class="input-group-append">
<button class="btn btn-danger" type="button" onclick="del(this)">
<i class="fa fa-remove"></i>
</button>
</div>
<i class="fa fa-add"></i>
</div>
<button id="addQuote" type="button" class="btn btn-success btn-block" onclick="add(this)">
<i class="fa fa-plus"></i>
</button>
</div>
<div class="form-group">
<label>Text (content)</label><br>
<small id="textHelp" class="form-text text-muted">
Full words only ("word" doesn't match "words"). No spaces.</small>
<div class="input-group" style="display:none">
<input type="text" class="form-control" name="texts" disabled>
<div class="input-group-append">
<button class="btn btn-danger" type="button" onclick="del(this)">
<i class="fa fa-remove"></i>
</button>
</div>
</div>
<button id="addText" type="button" class="btn btn-success btn-block" onclick="add(this)">
<i class="fa fa-plus"></i>
</button>
</div>
<div class="form-group">
<label>Tags</label><br>
<small id="tagHelp" class="form-text text-muted">
Full words only ("word" doesn't match "words"). No spaces. Tag search is <a href="https://hyp.is/o9yIjpb-EeqncC8B74lb0g/h.readthedocs.io/en/latest/api-reference/" target="_blank">not exact</a> (i.e., "web" matches "web annotation" too). No options allowed: only one term per field.</small>
<div class="input-group" style="display:none">
<input type="text" class="form-control" name="tags" disabled>
<div class="input-group-append">
<button class="btn btn-danger" type="button" onclick="del(this)">
<i class="fa fa-remove"></i>
</button>
</div>
</div>
<button id="addTags" type="button" class="btn btn-success btn-block" onclick="add(this)">
<i class="fa fa-plus"></i>
</button>
</div>
</div>
</div>
<div class="form-group">
<button type="button" class="btn btn-primary" onclick="generate()">Generate!</button>
</div>
</form>
</div>
<div class="col-md pb-2">
<h3>Done!</h3>
<p>
Click Generate! and copy the <a href="https://web.hypothes.is/help/atom-rss-feeds-for-annotations/" target="_blank">RSS or Atom Feed URL</a> below to receive notifications by email (with <a href="https://blogtrottr.com/" target="_blank">Blogtrottr</a> or <a href="https://ifttt.com/applets/147561p-rss-feed-to-email" target="_blank">IFTTT</a>), <a href="https://web.hypothes.is/blog/using-atom-feeds-to-receive-hypothesis-notifications-in-slack/" target="_blank">Slack</a>, <a href="https://ifttt.com/create/if-new-feed-item?sid=2" target="_blank">Telegram</a>, feed aggregators (e.g., <a href="https://feedly.com/" target="_blank">Feebly</a>), and more.
</p>
<form id="output">
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">RSS</i></span>
</div>
<input type="text" class="form-control" id="rss" readonly autocomplete="off">
<div class="input-group-append">
<button type="button" class="btn btn-outline-dark" onclick="copy(this)">
<i class="fa fa-copy"></i>
</button>
</div>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">Atom</i></span>
</div>
<input type="text" class="form-control" id="atom" readonly autocomplete="off">
<div class="input-group-append">
<button type="button" class="btn btn-outline-dark" onclick="copy(this)">
<i class="fa fa-copy"></i>
</button>
</div>
</div>
</div>
</form>
<div class="card">
<div class="card-header">
Feed preview
</div>
<div class="card-body">
<div class="card-text">
Coming soon...
<div id="feed">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="footer fixed-bottom">
<div class="container">
<span class="text-muted">Made with <i class="fa fa-heart"></i> by <a href="https://diegodlh.conversodromo.com.ar/" target="_blank">diegodlh</a>. Source code in <a href="https://github.com/diegodlh/hfeed/" target="_blank">GitHub</a>. Uses <a href="https://github.com/yairEO/tagify" target="_blank">Tagify</a></span>
</div>
</footer>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/@yaireo/[email protected]/dist/tagify.min.js" integrity="sha256-ZIf4iQs6jLy/taojvdJ9MEcvGVP/zV17GtWVxkILMi4=" crossorigin="anonymous"></script>
<script>
new Tagify(document.querySelector('input[id=uris]'), {
pattern: /^(([a-zA-Z0-9+.-]+:\/\/)?[^:\/*_]+(\/.*)?|[a-zA-Z0-9+.-]+:[^\/].*)$/,
keepInvalidTags: true,
delimiters: /[, ]/
});
new Tagify(document.querySelector('input[id=users]'), {
pattern: /^[a-zA-z0-9_.]{3,30}$/,
keepInvalidTags: true,
delimiters: /[, ]/
});
new Tagify(document.querySelector('input[id=groups]'), {
pattern: /^[a-zA-z0-9]{8}$/,
// keepInvalidTags: true,
delimiters: /[, ]/,
maxTags: 1 // only one group allowed
});
</script>
<script src="scripts.js"></script>
</body>
</html>