Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions switcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function inline_switcher() {
select_close = ' </select>\n '
dropdown = dropdown + select_close;
switcher.innerHTML = dropdown;
dropdown = switcher.getElementById('switcher_dropdown');
}

function add_switcher() {
Expand All @@ -43,6 +44,8 @@ function add_switcher() {
css_link.rel="stylesheet";
css_link.type="text/css";
css_link.href="https://dohliam.github.io/dropin-minimal-css/min/" + frameworks.split(",")[0] + ".min.css";
// Scroll to where we were and preserve combobox focus
css_link.onload= () => { window.location.hash = window.location.hash; dropdown.focus(); }
head.appendChild(css_link);
}

Expand Down