r20160106
This commit is contained in:
parent
023bd805c0
commit
fe66f79693
2 changed files with 18 additions and 11 deletions
|
@ -8,7 +8,7 @@
|
||||||
namespace Sakura;
|
namespace Sakura;
|
||||||
|
|
||||||
// Define Sakura version
|
// Define Sakura version
|
||||||
define('SAKURA_VERSION', '20160104');
|
define('SAKURA_VERSION', '20160106');
|
||||||
define('SAKURA_VLABEL', 'Eminence');
|
define('SAKURA_VLABEL', 'Eminence');
|
||||||
define('SAKURA_COLOUR', '#6C3082');
|
define('SAKURA_COLOUR', '#6C3082');
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,23 @@
|
||||||
// Space for things that need to happen onload
|
// Space for things that need to happen onload
|
||||||
window.addEventListener("load", function() {
|
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 %}
|
{% if session.checkLogin %}
|
||||||
// Convert href to object in logout link
|
// Convert href to object in logout link
|
||||||
prepareAjaxLink('headerLogoutLink', 'submitPost', ', true, "Logging out..."');
|
prepareAjaxLink('headerLogoutLink', 'submitPost', ', true, "Logging out..."');
|
||||||
|
@ -121,16 +138,6 @@
|
||||||
initialiseParallax('userBackground');
|
initialiseParallax('userBackground');
|
||||||
|
|
||||||
{% endif %}
|
{% 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
|
// Error reporter
|
||||||
|
|
Reference in a new issue