No edit summary
Run after the page is ready; header slogan moved to MediaWiki:Sitetitle; remove duplicate Termly loader; fix mobile footer bug
 
Line 1: Line 1:
let wordmark = document.querySelector(".mw-logo-wordmark");
/* Site-wide JavaScript for IEF.wiki.
if (wordmark) {
* - The header slogan now comes from [[MediaWiki:Sitetitle]], so no script is needed for it.
    wordmark.textContent = "Measure, Report, Verify, Repeat";
* - Termly's cookie banner is loaded by LocalSettings.php, so it is not loaded a second time here.
} else {
* - Everything below waits until the page is ready (it used to run too early and fail).
    let wordmarkMinerva = document.querySelector(".branding-box a span");
*/
    if (wordmarkMinerva) {
$( function () {
        console.log("Element found");
var disclaimer = 'IEF.wiki is open-source. All content, data, and information contributed to the IEF.wiki is made available under the CC0 1.0 Universal (Public Domain Dedication) license. This means that anyone is free to: Copy, modify, distribute, and use the content for any purpose, including commercial purposes, without asking for permission or providing attribution.';
        wordmarkMinerva.textContent = "Measure, Report, Verify, Repeat";
var contact = 'IEF.wiki is a platform developed by We Are Not Limited (registered in Ireland, registration number 791583). For inquiries, you can reach us via email at hello@ief.wiki or by phone at +353 87 450 8112.';
    } else {
    console.log("Wordmark element not found.");
    }
}


if (document.body.classList.contains('skin-vector') && document.body.classList.contains('skin-vector-2022')) {
if ( document.body.classList.contains( 'skin-vector-2022' ) ) {
 
var footer = document.querySelector( '#footer-info' );
        let footer = document.querySelector("#footer-info");  
if ( footer ) {
    if (footer) {
[ disclaimer, contact ].forEach( function ( text ) {
        let disclaimer = document.createElement("li");
var li = document.createElement( 'li' );
 
li.textContent = text;
        disclaimer.innerHTML = "IEF.wiki is open-source. All content, data, and information contributed to the IEF.wiki is made available under the CC0 1.0 Universal (Public Domain Dedication) license. This means that anyone is free to: Copy, modify, distribute, and use the content for any purpose, including commercial purposes, without asking for permission or providing attribution.";
footer.appendChild( li );
 
} );
        footer.appendChild(disclaimer);
}
 
} else {
        let contactInfo = document.createElement("li");
var footerMinerva = document.querySelector( '#footer-info-lastmod' );
 
if ( footerMinerva ) {
        contactInfo.innerHTML = "IEF.wiki is a platform developed by We Are Not Limited (registered in Ireland, registration number 791583). For inquiries, you can reach us via email at hello@ief.wiki or by phone at +353 87 450 8112.";
footerMinerva.innerHTML = disclaimer + '<br><br>' + contact;
 
}
        footer.appendChild(contactInfo);
}
    }  
} );
} else {
    let footerMinerva = document.querySelector("#footer-info-lastmod");  
 
    if (footerMinerva) {
        footerMinerva.innerHTML = "IEF.wiki is open-source. All content, data, and information contributed to the IEF.wiki is made available under the CC0 1.0 Universal (Public Domain Dedication) license. This means that anyone is free to: Copy, modify, distribute, and use the content for any purpose, including commercial purposes, without asking for permission or providing attribution. <br> <br> IEF.wiki is a platform developed by We Are Not Limited (registered in Ireland, registration number 791583). For inquiries, you can reach us via email at hello@ief.wiki or by phone at +353 87 450 8112.";
    footer.appendChild(footerMinerva);
}
   
}
 
 
mw.loader.load("https://app.termly.io/resource-blocker/91c4b39f-b45f-4e4c-a1fb-f7ea4b31a79a?autoBlock=on");