MediaWiki:Common.js: Forskelle mellem versioner

ingen redigeringsopsummering
No edit summary
Tag: Manuel tilbagerulning
No edit summary
 
(2 mellemliggende versioner af 2 andre brugere ikke vist)
Linje 44: Linje 44:
    
    
     $("#mw-site-navigation").append(
     $("#mw-site-navigation").append(
         '<div id="site-themes" class="sidebar-chunk"><div role="navigation" class="mw-portlet" id="p-tbt" aria-labelledby="p-tbt-label"><h3 id="p-tbt-label" dir="ltr" lang="da" style="padding-bottom:0;margin-bottom:0;">Særlige temaer</h3><br><div class="mw-portlet-body"><a class="image" href="https://aarhuswiki.dk/wiki/Kongelunden"><img style="width:100%;margin-bottom:.7em;" alt="Kongelunden" src="/mediawiki/images/7/73/Kongelunden_logo_groen_01_150px.jpg"/></a><br><hr><p><div class="mw-portlet-body"><a class="image" href="https://aarhuswiki.dk/wiki/Broer_over_Aarhus_%C3%85_(oversigtskort)"><img style="width:100%;margin-bottom:.7em;" alt="Broerne over Aarhus Aa" src="/mediawiki/images/1/1e/Broerne_over_Aarhus_Aa.jpg"/></a></div></div></div></div>'
         '<div id="site-themes" class="sidebar-chunk"><div role="navigation" class="mw-portlet" id="p-tbt" aria-labelledby="p-tbt-label"><h3 id="p-tbt-label" dir="ltr" lang="da" style="padding-bottom:0;margin-bottom:0;">Særlige temaer</h3><br><div class="mw-portlet-body"><a class="image" href="https://aarhuswiki.dk/wiki/Kongelunden"><img style="width:100%;margin-bottom:.7em;" alt="Kongelunden" src="/mediawiki/images/7/73/Kongelunden_logo_groen_01_150px.jpg"/></a><br><hr><p><div class="mw-portlet-body"><a class="image" href="https://aarhuswiki.dk/wiki/Boligforeninger_i_Aarhus_Kommune"><img style="width:100%;margin-bottom:.7em;" alt="Boligforeninger i Aarhus" src="/mediawiki/images/b/b0/Boligforeninger_i_Aarhus_wikigrafik.jpg"/></a></div></div></div></div>'
     );
     );
    
    
Linje 59: Linje 59:
     }
     }
   });
   });
 
  // Debounce function in ES5 syntax
function debounce(func, wait) {
    var timeout;
    return function() {
        var context = this, args = arguments;
        clearTimeout(timeout);
        timeout = setTimeout(function() {
            func.apply(context, args);
        }, wait);
    };
}
// Function to reload the page
function reloadPage() {
    window.location.reload();
}
// Set up the resize event listener with debounce
window.addEventListener('resize', debounce(reloadPage, 250)); // 250 milliseconds