mirror of
https://github.com/Kozea/Radicale.git
synced 2025-07-02 16:58:30 +00:00
Run JS earlier
This commit is contained in:
parent
22d2d4af4c
commit
7d0ab1efc5
4 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
window.addEventListener("load", function() {
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
function resetSelect(select) {
|
||||
for (let option of select.options) {
|
||||
option.selected = option.defaultSelected;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
window.addEventListener("load", function() {
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
document.querySelector("button[data-name=nav-open]").addEventListener("click", function() {
|
||||
document.documentElement.classList.add("nav-opened");
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
window.addEventListener("load", function() {
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
for (let link of document.querySelectorAll("nav a")) {
|
||||
link.addEventListener("click", function() {
|
||||
let fragmentIndex = link.href.indexOf("#");
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
window.addEventListener("load", function() {
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
function findActiveSection(sections) {
|
||||
let result = sections[0];
|
||||
for (let [section, link] of sections) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue