2022-11-09 13:31:58 +01:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
window.onload = () => {
|
|
|
|
let menu_expand = document.querySelector('a.menu-expand');
|
|
|
|
let mobile_foldable = document.querySelector('nav.mobile-foldable');
|
|
|
|
|
|
|
|
menu_expand.addEventListener('click', () => {
|
|
|
|
mobile_foldable.classList.toggle('show');
|
|
|
|
});
|
2023-08-21 00:58:11 +02:00
|
|
|
loadAd()
|
2022-11-09 13:31:58 +01:00
|
|
|
};
|
2023-08-21 00:58:11 +02:00
|
|
|
|
|
|
|
let current_ad_number = null;
|
|
|
|
function loadAd() {
|
|
|
|
fetch('/next_ad.json?' + new URLSearchParams({
|
|
|
|
n: current_ad_number
|
|
|
|
}).then((res) => {
|
|
|
|
return res.json()
|
|
|
|
}).then((res) => {
|
|
|
|
console.log(res)
|
|
|
|
})
|
|
|
|
}
|