-
Notifications
You must be signed in to change notification settings - Fork 0
/
listtemplateheader.html
42 lines (36 loc) · 1.4 KB
/
listtemplateheader.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<form></form><div class="text-right d-print-none ion-hide">
<label for="checkbox1" onClick="save()"><input type="checkbox" id="checkbox1"> <i class="fa-solid fa-rotate" style="vertical-align: super;"></i></input></label>
</div>
<script>
// Run once per session.
if ((typeof sessionStorage !== 'undefined') &&
(sessionStorage.getItem('ChangeEntriesReload') === null)) {
// Set url for 1000 entries per site.
const params = new URLSearchParams(location.search);
params.set('perpage', 1000);
window.history.replaceState({}, '', `${location.pathname}?${params}`);
// Reload page.
window.location.reload();
console.log('ok');
sessionStorage.setItem('ChangeEntriesReload', true);
}
</script>
<script>
// Save status of checkbox.
function save() {
var checkbox = document.getElementById("checkbox1");
localStorage.setItem("checkbox1", checkbox.checked);
location.reload();
}
// Get status of checkbox.
var checked = JSON.parse(localStorage.getItem("checkbox1"));
document.getElementById("checkbox1").checked = checked;
// Reload if checkbox is checked.
if (checkbox1.checked == true) {
// Reload single div every 4 sec.
setInterval(function () {
location.reload();
}, 4000);
}
</script>
<div class="board" id="data-content" data-masonry='{"percentPosition": true }'>