tangled
alpha
login
or
join now
mackuba.eu
/
skythread
14
fork
atom
Thread viewer for Bluesky
14
fork
atom
overview
issues
pulls
pipelines
call init via DOMContentLoaded
mackuba.eu
3 months ago
487f9422
20f5ee8d
+4
-9
3 changed files
expand all
collapse all
unified
split
index.html
src
skythread.ts
types.d.ts
+1
-5
index.html
···
4
4
<meta charset="UTF-8">
5
5
<meta http-equiv="Content-Security-Policy" content="
6
6
default-src 'none';
7
7
-
script-src 'self' 'sha256-C5RUxaoIkpRux1/UhIgLL5RalHWo6EOGHzWOhCMr8Fs=';
7
7
+
script-src 'self';
8
8
style-src 'self';
9
9
img-src 'self' https:;
10
10
font-src 'self';
···
30
30
</div>
31
31
32
32
<script src="dist/skythread.js"></script>
33
33
-
34
34
-
<script>
35
35
-
init();
36
36
-
</script>
37
33
</body>
38
34
</html>
+3
-3
src/skythread.ts
···
1
1
-
import * as svelte from 'svelte';
1
1
+
import { mount } from 'svelte';
2
2
import { parseURLParams } from './router.js';
3
3
import App from './App.svelte';
4
4
5
5
function init() {
6
6
let params = parseURLParams(location.search);
7
7
-
svelte.mount(App, { target: document.body, props: { params }});
7
7
+
mount(App, { target: document.body, props: { params }});
8
8
}
9
9
10
10
-
window.init = init;
10
10
+
document.addEventListener("DOMContentLoaded", init);
-1
src/types.d.ts
···
1
1
interface Window {
2
2
root: AnyPost;
3
3
subtreeRoot: AnyPost;
4
4
-
init: () => void;
5
4
}
6
5
7
6
type json = Record<string, any>;