template: move js session refresh to single file ; use fetch API

Tá an tiomantas seo le fáil i:
2019-08-26 21:21:47 +02:00
tuismitheoir 2b460105dc
tiomantas 3b312c7d9e
D'athraigh 3 comhad le 7 breiseanna agus 16 scriosta

Féach ar an gComhad

@ -5,14 +5,7 @@
</ul> </ul>
</footer> </footer>
<script> <script>
function refreshSession() {qswiki:include:js_session_refresh}
{
var req = new XMLHttpRequest();
req.open("GET", "{qswiki:config:refreshsessionurl}");
req.send();
setTimeout(refreshSession, 60*2*1000);
}
setTimeout(refreshSession, 60*2*1000);
</script> </script>
</body> </body>
</html> </html>

Féach ar an gComhad

@ -0,0 +1,5 @@
function refreshSession()
{
fetch(new Request("{qswiki:config:refreshsessionurl}"));
}
setInterval(refreshSession, 60*2*1000);

Féach ar an gComhad

@ -7,14 +7,7 @@
</ul> </ul>
</footer> </footer>
<script> <script>
function refreshSession() {qswiki:include:js_session_refresh}
{
var req = new XMLHttpRequest();
req.open("GET", "{qswiki:config:refreshsessionurl}");
req.send();
setTimeout(refreshSession, 60*2*1000);
}
setTimeout(refreshSession, 60*2*1000);
</script> </script>
</body> </body>
</html> </html>