You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
384 B
JavaScript

6 years ago
document.addEventListener("DOMContentLoaded", function () {
// subtitles
var b = document.createElement("button"),
c = document.createElement("div");
c.appendChild(b);
b.innerHTML = "toggle";
b.addEventListener("click", function () {
document.body.classList.toggle("subtitle");
});
document.body.append(c);
c.id = "controls";
})