1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-02-08 23:39:46 +01:00

auto-reload.js: handle small screens

This commit is contained in:
Zankaria 2024-08-18 19:31:48 +02:00 committed by Zankaria
parent d41db75ed5
commit 602f7b5982

View File

@ -139,7 +139,12 @@ $(document).ready(function(){
var poll = function(manualUpdate) {
stop_auto_update();
$('#update_secs').text(_("Updating..."));
let isScreenSmall = window.matchMedia('(max-width: 48em)').matches;
if (isScreenSmall) {
$('#update_secs').text('...');
} else {
$('#update_secs').text(_('Updating...'));
}
$.ajax({
url: document.location,