Skip to content

Commit a8ac41b

Browse files
committed
chore(ci): upstream update
1 parent 1b8f444 commit a8ac41b

File tree

1,528 files changed

+642123
-629357
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,528 files changed

+642123
-629357
lines changed

assets/index-BCOupvNk.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

assets/index-CigVbyh2.js

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/pico.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="utf-8" />
66
<meta name="apple-mobile-web-app-capable" content="yes" />
7-
<meta name="generator" content="slidesdown 0.13.2" />
7+
<meta name="generator" content="slidesdown 0.18.11" />
88
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
99
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
1010
<title>Slidesdown</title>
@@ -40,7 +40,7 @@
4040
}
4141
}
4242
</script>
43-
<script type="module" crossorigin src="/assets/index-BCOupvNk.js"></script>
43+
<script type="module" crossorigin src="/assets/index-CigVbyh2.js"></script>
4444
</head>
4545

4646
<body>
@@ -89,7 +89,6 @@
8989
};
9090
</script>
9191
<script src="/vendor/unocss/core.global.js"></script>
92-
<!-- DOCKER_LOADER_LINE -->
9392
<!-- <script -->
9493
<!-- async -->
9594
<!-- src="https://www.googletagmanager.com/gtag/js?id=G-5277P6Q3RP" -->

init.js

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import SlidesDown from "slidesdown";
1818
// computeURL builds a URL to a raw markdown file from a short human-typable
1919
// string, e.g. it turns github.com/slidesdown/slidesdown into
2020
// https://raw.githubusercontent.com/jceb/slidesdown/main/SLIDES.md
21-
const computeURL = (defaults, url) => {
21+
function computeURL(defaults, url) {
2222
if (!(defaults.branch && defaults.resource)) {
2323
console.error("Default branch and/or resource unset");
2424
return;
@@ -65,42 +65,45 @@ const computeURL = (defaults, url) => {
6565
return decodedURL;
6666
};
6767

68-
const main = async (defaults) => {
68+
async function main(defaults) {
6969
if (!(defaults.branch && defaults.resource && defaults.markdownElementId)) {
70-
console.error(
71-
"Default branch, resource and/or markdownElementId are not set",
72-
);
70+
console.error("Default branch, resource and/or markdownElementId are not set");
7371
return;
7472
}
7573
const mdSection = document.getElementById(defaults.markdownElementId);
7674
if (!mdSection) {
77-
console.error(
78-
`Couldn't find markdown element with id: ${defaults.markdownElementId}`,
79-
);
75+
console.error(`Couldn't find markdown element with id: ${defaults.markdownElementId}`);
8076
return;
8177
}
82-
const customSlidesBase64Gzip = new URLSearchParams(
83-
new URL(document.URL).search,
84-
).get("slides64");
78+
const customSlidesBase64Gzip = new URLSearchParams(new URL(document.URL).search).get("slides64");
8579
if (customSlidesBase64Gzip) {
8680
async function decompressBlob(blob) {
87-
const decompressedStream = blob.pipeThrough(new DecompressionStream("gzip"));
81+
const decompressedStream = blob.pipeThrough(
82+
new DecompressionStream("gzip"),
83+
);
8884
return await new Response(decompressedStream).blob();
8985
}
90-
const slidesGz = Uint8Array.from(atob(decodeURI(customSlidesBase64Gzip.replaceAll('-', '+').replaceAll('_', '/'))), c => c.charCodeAt(0))
86+
const slidesGz = Uint8Array.from(
87+
atob(
88+
decodeURI(
89+
customSlidesBase64Gzip.replaceAll("-", "+").replaceAll("_", "/"),
90+
),
91+
),
92+
(c) => c.charCodeAt(0),
93+
);
9194
// function buf2hex(buffer) { // buffer is an ArrayBuffer
9295
// return [...new Uint8Array(buffer)]
9396
// .map(x => x.toString(16).padStart(2, '0'))
9497
// .join('');
9598
// }
96-
const blob = await decompressBlob(new Blob([slidesGz], { type: "application/octet-stream" }).stream())
97-
const text = await blob.text()
99+
const blob = await decompressBlob(
100+
new Blob([slidesGz], { type: "application/octet-stream" }).stream(),
101+
);
102+
const text = await blob.text();
98103
mdSection.setAttribute("data-markdown", "<<load-plain-markdown>>");
99104
mdSection.setAttribute("data-markdown-plain", text);
100105
} else {
101-
const customSlidesURL = new URLSearchParams(
102-
new URL(document.URL).search,
103-
).get("slides");
106+
const customSlidesURL = new URLSearchParams(new URL(document.URL).search).get("slides");
104107
let slidesURL = customSlidesURL
105108
? customSlidesURL
106109
: `github.com/slidesdown/slidesdown/blob/${defaults.branch}/${defaults.resource}`;
@@ -113,18 +116,50 @@ const main = async (defaults) => {
113116
}
114117
mdSection.setAttribute("data-markdown", slidesURL);
115118
}
116-
119+
const multiplexBase64 = new URLSearchParams(new URL(document.URL).search).get("multiplex64");
120+
let multiplex = {};
121+
let dependencies = [];
122+
if (multiplexBase64) {
123+
multiplex = JSON.parse(atob(
124+
decodeURI(
125+
multiplexBase64.replaceAll("-", "+").replaceAll("_", "/"),
126+
),
127+
));
128+
multiplex = {
129+
secret: multiplex?.secret || null,
130+
id: multiplex?.id || null,
131+
url: "/"
132+
// url: "https://reveal-multiplex.glitch.me"
133+
};
134+
const minium_secret_length = 20;
135+
if (typeof multiplex.id != "string" && multiplex.id.length < minium_secret_length) {
136+
multiplex = {}
137+
}
138+
if (multiplex?.id) {
139+
dependencies.push({ src: '/socket.io/socket.io.js', async: true })
140+
// dependencies.push({ src: 'https://reveal-multiplex.glitch.me/socket.io/socket.io.js', async: true })
141+
}
142+
if (multiplex?.secret) {
143+
dependencies.push({ src: '/vendor/multiplex/master.js', async: true })
144+
// dependencies.push({ src: 'https://reveal-multiplex.glitch.me/master.js', async: true })
145+
} else {
146+
dependencies.push({ src: '/vendor/multiplex/client.js', async: true })
147+
// dependencies.push({ src: 'https://reveal-multiplex.glitch.me/client.js', async: true })
148+
}
149+
}
117150
// initialize presentation
118151
Reveal.slidesdownLoader = () => {
119152
window.location.href = "/loader.html";
120153
};
121154
Reveal.initialize({
155+
multiplex,
156+
dependencies,
122157
hash: true,
123158
// mathjax2: {
124159
// mathjax: "/vendor/mathjax/MathJax.js"
125160
// },
126161
mathjax3: {
127-
mathjax: "/vendor/mathjax/es5/tex-mml-chtml.js"
162+
mathjax: "/vendor/mathjax/es5/tex-mml-chtml.js",
128163
},
129164
plugins: [
130165
SlidesDown,

0 commit comments

Comments
 (0)