mirror of
https://github.com/huhu/rust-search-extension
synced 2024-11-16 00:17:57 +00:00
12 lines
No EOL
448 B
JavaScript
12 lines
No EOL
448 B
JavaScript
document.addEventListener('DOMContentLoaded', function() {
|
|
var openTypeSelect = document.querySelector('select[name="open-type"]');
|
|
if (localStorage.getItem("open-type")) {
|
|
openTypeSelect.value = localStorage.getItem("open-type");
|
|
openTypeSelect.selected = true;
|
|
}
|
|
openTypeSelect.onchange = onOpenTypeChange;
|
|
}, false);
|
|
|
|
function onOpenTypeChange(event) {
|
|
localStorage.setItem("open-type", event.target.value);
|
|
} |