MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
Admin 4 bbp (talk | contribs) (Created page with "→Any JavaScript here will be loaded for all users on every page load.: console.log("hello");") |
Admin 4 bbp (talk | contribs) 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. */ | ||
console.log(" | console.log("checking to redirect"); | ||
if (window.location.protocol === 'http:') { | |||
console.log("redirect to ssl"); | |||
window.location.href = window.location.href.replace('http://', 'https://'); | |||
} |
Revision as of 20:44, 21 November 2024
/* Any JavaScript here will be loaded for all users on every page load. */ console.log("checking to redirect"); if (window.location.protocol === 'http:') { console.log("redirect to ssl"); window.location.href = window.location.href.replace('http://', 'https://'); }