Made the check for http vs. https more robust to also work locally
// The next lines work with pydata theme
-if (location.protocol !== 'https:') {
+if (location.protocol.startsWith("http") & location.protocol !== 'https:') {
location.replace(`https:${location.href.substring(location.protocol.length)}`);
}
