MediaWiki:Common.js: Difference between revisions

From Black Bibliography Project
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
var logoutLink = document.querySelector('a[href*="Special:UserLogout"]');
if (logoutLink) {
    console.log('Log out link found!');
} else {
    console.log('Log out link not found.');
}


console.log("checking to redirect");
console.log("checking to redirect");

Revision as of 21:14, 21 November 2024

/* Any JavaScript here will be loaded for all users on every page load. */

var logoutLink = document.querySelector('a[href*="Special:UserLogout"]');

if (logoutLink) {
    console.log('Log out link found!');
} else {
    console.log('Log out link not found.');
}


console.log("checking to redirect");
if (window.location.protocol === 'http:') {
    console.log("redirect to ssl");
    window.location.href = window.location.href.replace('http://', 'https://');
}