Код: Выделить всё
**
Easy Yazılım Hatırlatıcı
body{margin:0;font-family:sans-serif;background:#f3f3f3}
header{background:#007bff;color:#fff;text-align:center;padding:1rem;font-size:1.3rem}
nav{display:flex;background:#ddd}
nav button{flex:1;padding:1rem;border:none;background:#eee;font-weight:700}
nav button.active{background:#ccc}
.pane{display:none;padding:1rem}
.pane.active{display:block}
#icerik{background:#fff;padding:1rem;border-radius:8px;box-shadow:0 0 5px #aaa;font-size:1.1rem}
Easy Yazılım Hatırlatıcı
Mesaj
Alacaklar
Borçlar
Stok
Yükleniyor…
alacaklar.txt
borclar.txt
stok.txt
/* ▼ Sekme değiştir */
document.querySelectorAll('.tab').forEach(btn=>{
btn.onclick=e=>{
document.querySelectorAll('.tab').forEach(b=>b.classList.remove('active'));
document.querySelectorAll('.pane').forEach(p=>p.classList.remove('active'));
btn.classList.add('active');
document.getElementById(btn.dataset.id).classList.add('active');
};
});
let lastMsg="";
function kontrolEt(){
fetch("mesaj.txt?"+Date.now())
.then(r=>r.text()).then(t=>{
t=t.trim();
if(t && t!==lastMsg){
document.getElementById('icerik').textContent=t;
lastMsg=t;
/* ► Android titreşim */
if(typeof AndroidVibrator!=="undefined"){ AndroidVibrator.vibrate(); }
}
});
}
setInterval(kontrolEt,5000);
kontrolEt();
**
Подробнее здесь: https://stackoverflow.com/questions/796 ... ge-arrived