blob: 96b736be8697ab7b6336f1f8c4f66d8939603e73 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import reddit from "../../assets/javascripts/helpers/reddit.js";
let disableRedditElement = document.getElementById("disable-reddit");
let redditFrontendElement = document.getElementById("reddit-frontend");
disableRedditElement.checked = !reddit.getDisableReddit();
redditFrontendElement.value = reddit.getRedditFrontend();
disableRedditElement.addEventListener("change",
(event) => reddit.setDisableReddit(!event.target.checked)
);
redditFrontendElement.addEventListener("change",
(event) => reddit.setRedditFrontend(event.target.options[redditFrontendElement.selectedIndex].value)
);
|