mirror of
https://github.com/Noratrieb/std-internal-docs.git
synced 2026-01-14 09:35:01 +01:00
31 lines
1.1 KiB
HTML
31 lines
1.1 KiB
HTML
<script type="module">
|
|
const info = document.createElement("div");
|
|
info.classList.add("_internal-info");
|
|
info.innerHTML = `
|
|
<div>⚠ Internal Docs ⚠</div>
|
|
<div>This website was built by <a href="https://github.com/Noratrieb/std-internal-docs">Noratrieb</a></div>
|
|
|
|
<div>
|
|
<div>
|
|
<label for="target-select">
|
|
Select Target
|
|
</label>
|
|
</div>
|
|
<div>
|
|
<select id="target-select">
|
|
<option value="x86_64-unknown-linux-gnu">x86-64 GNU/Linux</option>
|
|
<option value="x86_64-pc-windows-msvc">x86-64 Windows MSVC</option>
|
|
<option value="aarch64-apple-darwin">ARM64 MacOS</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
`;
|
|
const elems = document.querySelector(".sidebar-elems");
|
|
elems.parentNode.insertBefore(info, elems);
|
|
|
|
document.getElementById("target-select").addEventListener("change", (e) => {
|
|
// not very clever, just change the target at all.
|
|
// we could try to substitute the path or something better.
|
|
window.location.pathname = `${e.target.value}/std`;
|
|
});
|
|
</script>
|