mirror of
https://github.com/Kozea/Radicale.git
synced 2025-07-23 17:48:30 +00:00
Switch to new website
This commit is contained in:
parent
c1720ee27a
commit
01f8e976e1
88 changed files with 3 additions and 8831 deletions
20
assets/document-branches.js
Normal file
20
assets/document-branches.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
window.addEventListener("load", function() {
|
||||
let select = document.querySelector("header select.documentBranch");
|
||||
while (select.firstChild) {
|
||||
select.removeChild(select.firstChild);
|
||||
}
|
||||
for (let branch of documentBranches) {
|
||||
let option = document.createElement("option");
|
||||
option.textContent = branch;
|
||||
if (branch === documentBranch) {
|
||||
option.setAttribute("selected", "");
|
||||
}
|
||||
select.prepend(option);
|
||||
}
|
||||
select.addEventListener("change", function() {
|
||||
if (select.value !== documentBranch) {
|
||||
location.assign(select.value + ".html");
|
||||
select.value = documentBranch;
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue