2020-02-27 02:34:49 +01:00
|
|
|
window.addEventListener("load", function() {
|
2020-04-04 15:30:03 +02:00
|
|
|
let select = document.querySelector("header .documentBranch select");
|
2021-12-05 02:59:43 +01:00
|
|
|
while (select.length > 0) {
|
|
|
|
select.remove(0);
|
2020-02-27 02:34:49 +01:00
|
|
|
}
|
|
|
|
for (let branch of documentBranches) {
|
2021-12-05 02:59:43 +01:00
|
|
|
select.add(new Option(branch, branch, branch === documentBranch, branch === documentBranch), 0);
|
2020-02-27 02:34:49 +01:00
|
|
|
}
|
|
|
|
select.addEventListener("change", function() {
|
|
|
|
if (select.value !== documentBranch) {
|
2021-12-05 02:59:43 +01:00
|
|
|
location.assign(encodeURIComponent(select.value + ".html"));
|
2020-02-27 02:34:49 +01:00
|
|
|
select.value = documentBranch;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|