r20160106

This commit is contained in:
Pachira 2016-01-06 23:33:22 +01:00
parent 023bd805c0
commit fe66f79693
2 changed files with 18 additions and 11 deletions

View file

@ -8,7 +8,7 @@
namespace Sakura;
// Define Sakura version
define('SAKURA_VERSION', '20160104');
define('SAKURA_VERSION', '20160106');
define('SAKURA_VLABEL', 'Eminence');
define('SAKURA_COLOUR', '#6C3082');

View file

@ -61,6 +61,23 @@
// Space for things that need to happen onload
window.addEventListener("load", function() {
// Check if we can use SSL
if (window.location.protocol.toLowerCase() === "http:") {
// Build check string
var sslCheckDest = 'https://' + window.location.host + sakuraVars.content + '/pixel.png';
// Create a new image
var sslCheck = new Image();
// Add an onload
sslCheck.onload = function() {
window.location.assign(window.location.href.toLowerCase().replace('http://', 'https://'));
}
// Set the source
sslCheck.src = sslCheckDest;
}
{% if session.checkLogin %}
// Convert href to object in logout link
prepareAjaxLink('headerLogoutLink', 'submitPost', ', true, "Logging out..."');
@ -121,16 +138,6 @@
initialiseParallax('userBackground');
{% endif %}
if(!Sakura.cookie('accept_cookies')) {
notifyUI({
"title": sakuraVars.siteName + " uses cookies!",
"text": "Click this if you're OK with that and want to hide this message.",
"img": "FONT:fa-asterisk",
"link": "javascript:Sakura.cookie('accept_cookies', 'true; expires=" + (new Date(2147483647000)).toUTCString() + "');notifyClose(this.parentNode.id);"
});
}
});
// Error reporter