Feed templates

This commit is contained in:
Mouse Reeve
2021-01-29 10:25:31 -08:00
parent 932acc961f
commit b53ef73faf
13 changed files with 234 additions and 196 deletions

View File

@ -35,8 +35,17 @@ window.onload = function() {
// polling
document.querySelectorAll('[data-poll]')
.forEach(el => polling(el));
// browser back behavior
document.querySelectorAll('[data-back]')
.forEach(t => t.onclick = back);
};
function back(e) {
e.preventDefault();
history.back();
}
function polling(el) {
let delay = 10000 + (Math.random() * 1000);
setTimeout(function() {