forked from kawarimidoll/bluestream
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
136 lines (130 loc) · 5.29 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Bluestream</title>
<meta property="og:url" content="https://bluestream.deno.dev/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Bluestream" />
<meta property="og:description" content="RSS feed generator for Bluesky." />
<meta property="og:site_name" content="Bluestream" />
<meta property="og:image" content="https://cdn.jsdelivr.net/gh/twitter/[email protected]/assets/72x72/1f233.png" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.min.css" />
<link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/twitter/[email protected]/assets/72x72/1f233.png" />
<style>
body {
text-align: center;
}
input {
display: inline;
}
#notice {
border: thick double;
}
</style>
</head>
<body>
<h1>Bluestream</h1>
<div id="notice">
<p>💡 NOTICE 💡</p>
<p>Thank you for accessing this project.</p>
<p>
Because this is used by a large number of users,<br>
it may stop due to Deno Deploy quota limit.
</p>
<p>
If you want to recieve RSS feed of your posts, you can use official RSS:<br>
https://bsky.app/profile/<strong>bsky-handle</strong>/rss
</p>
</div>
<div>
<p>RSS feed generator for Bluesky.</p>
<p>Access to the path /bsky-handle directory or input handle of Bluesky here ↓</p>
<form id="form">
<div>
<input id="input-handle" name="input-handle" aria-label="input-handle" required autofocus placeholder="xxx.bsky.social" />
<input type="submit" id="submit-button" name="submit-button" aria-label="submit-button" value="Generate feed" />
</div>
<div>
<div>
<label>
<input type="checkbox" id="include-repost" name="include-repost" aria-label="include-repost" /> include raw repost (quote repost is always included)
</label>
</div>
<div>
<label>
<input type="checkbox" id="include-reply-context" name="include-reply-context" aria-label="include-reply-context" /> include replied to context (the post replied to)
</label>
</div>
<div>
<label>
<input type="checkbox" id="exclude-reply" name="exclude-reply" aria-label="exclude-reply" /> exclude reply posts (posts replying to another)
</label>
</div>
<div>
<label>
<input type="checkbox" id="exclude-mention" name="exclude-mention" aria-label="exclude-mention" /> exclude mention (the post that contains <code>@handle</code>)
</label>
</div>
<div>
<label>
<input type="checkbox" id="media-full" name="media-full" aria-label="media-full" /> show full media instead of thumbnail (uses more data)
</label>
</div>
<div>
<label>
<input type="checkbox" id="include-embed-preview" name="include-embed-preview" aria-label="include-embed-preview" /> include embedded link preview
</label>
</div>
<div>
<label>
<input type="checkbox" id="link-psky" name="link-psky" aria-label="link-psky" /> Use psky.app for link (EXPERIMENTAL, useful for readers with link previews)
</label>
</div>
</div>
</form>
<p>You can use DID (like <code>did:plc:xxxx</code>) instead of handle.</p>
<p>Currently only posts in bsky.social is supported.</p>
<p>
<a title="https://github.com/kawarimidoll/bluestream" target="_blank" rel="noopener noreferrer nofollow" href="https://github.com/kawarimidoll/bluestream">https://github.com/kawarimidoll/bluestream</a>
</p>
</div>
<script>
const form = document.getElementById("form");
form.addEventListener("submit", event => {
event.preventDefault();
document.getElementById("submit-button").value = "Calculating...";
[...document.getElementsByTagName("input")].forEach(e => e.disabled = true);
const url = new URL(window.location.href);
url.pathname = document.getElementById("input-handle").value;
if (document.getElementById("include-repost").checked) {
url.searchParams.set("repost", "include");
}
if (document.getElementById("exclude-reply").checked) {
url.searchParams.set("reply", "exclude");
}
if (document.getElementById("include-reply-context").checked) {
url.searchParams.set("reply-context", "include");
}
if (document.getElementById("exclude-mention").checked) {
url.searchParams.set("mention", "exclude");
}
if (document.getElementById("media-full").checked) {
url.searchParams.set("media", "full");
}
if (document.getElementById("link-psky").checked) {
url.searchParams.set("link", "psky");
}
if (document.getElementById("include-embed-preview").checked) {
url.searchParams.set("embed-preview", "include");
}
window.location.href = url.toString();
});
window.addEventListener('pageshow', () => {
document.getElementById("submit-button").value = "Generate feed";
[...document.getElementsByTagName("input")].forEach(e => e.disabled = false);
});
</script>
</body>
</html>