MediaWiki:Common.js: Difference between revisions
Myriad-admin (talk | contribs) Trying lazy loading Tags: Mobile edit Mobile web edit |
Myriad-admin (talk | contribs) Trying proper footer Tags: Mobile edit Mobile web edit |
||
Line 2: | Line 2: | ||
function insertCustomFooter() { | function insertCustomFooter() { | ||
var $footer = $('#footer'); | var $footer = $('#footer'); | ||
if (!$footer.length) return setTimeout(insertCustomFooter, 100); | if (!$footer.length) return setTimeout(insertCustomFooter, 100); | ||
$footer.append(` | $footer.append(` | ||
Line 19: | Line 19: | ||
</div> | </div> | ||
<div class="footer-eu-logo"> | <div class="footer-eu-wrapper"> | ||
<div class="footer-eu-logo"> | |||
<img src="/wiki/Special:FilePath/EU-logo.png" alt="EU logo"> | |||
</div> | |||
<div class="footer-eu-text"> | |||
<p>This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 123456.</p> | |||
</div> | |||
</div> | </div> | ||
Revision as of 16:14, 21 May 2025
mw.loader.using('mediawiki.util').then(function () {
function insertCustomFooter() {
var $footer = $('#footer');
if (!$footer.length) return setTimeout(insertCustomFooter, 100);
$footer.append(`
<div id="lcc-footer">
<div id="lcc-footer-content">
<div class="lcc-row lcc-top-row">
<a href="/index.php/Disaster_Risk_Gateway">About</a>
<a href="/index.php/Contact">Contact</a>
<a href="/index.php?title=Main_Page&mobileaction=toggle_view_mobile">Mobile View</a>
</div>
<div class="lcc-row lcc-bottom-row">
<a href="/index.php/Disaster_Risk_Gateway:Privacy_Notice">Privacy Notice</a>
<a href="/index.php/Disaster_Risk_Gateway:Terms_of_Use">Terms of Use</a>
</div>
<div class="footer-eu-wrapper">
<div class="footer-eu-logo">
<img src="/wiki/Special:FilePath/EU-logo.png" alt="EU logo">
</div>
<div class="footer-eu-text">
<p>This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No. 123456.</p>
</div>
</div>
</div>
</div>
`);
}
insertCustomFooter();
});