Bugfixes
• Fix a redirection bug in handler.js. • Make the card generator process images nicely.
This commit is contained in:
parent
828c95d82a
commit
aa73598619
@ -2,6 +2,7 @@
|
|||||||
title: Main Page
|
title: Main Page
|
||||||
layout: welcome
|
layout: welcome
|
||||||
redirect_from:
|
redirect_from:
|
||||||
|
- /index2.html
|
||||||
- /welcome.html
|
- /welcome.html
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -65,6 +65,7 @@ colour = helpers.escapeHTML(colour);
|
|||||||
// Get the image URL
|
// Get the image URL
|
||||||
if (img) {
|
if (img) {
|
||||||
// More code to support legacy options
|
// More code to support legacy options
|
||||||
|
var url = helpers.url + '/images/';
|
||||||
switch (img) {
|
switch (img) {
|
||||||
case "1": // The older format had '1-6',
|
case "1": // The older format had '1-6',
|
||||||
case "2": // not xmas[n] and birthday[n].
|
case "2": // not xmas[n] and birthday[n].
|
||||||
@ -72,11 +73,11 @@ if (img) {
|
|||||||
case "4": // used to be a Christmas
|
case "4": // used to be a Christmas
|
||||||
case "5": // card generator.
|
case "5": // card generator.
|
||||||
case "6":
|
case "6":
|
||||||
imgurl = helpers.url + "/images/xmas" + img + ".jpg";
|
imgurl = url + 'xmas' + img + '.jpg';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (img) {
|
if (img) {
|
||||||
imgurl = helpers.url + "/images/" + img + ".jpg";
|
imgurl = url + img + ".jpg";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -26,14 +26,18 @@ var redirects = {
|
|||||||
if (redirects[script]) {
|
if (redirects[script]) {
|
||||||
if (redirects[script].indexOf('/') > -1) {
|
if (redirects[script].indexOf('/') > -1) {
|
||||||
window.stop();
|
window.stop();
|
||||||
window.location.href = helpers.baseurl + redirects[script];
|
var url = redirects[script];
|
||||||
|
if (url.indexOf('://') < 0) {
|
||||||
|
url = helpers.baseurl + url;
|
||||||
|
}
|
||||||
|
window.location.href = url;
|
||||||
} else {
|
} else {
|
||||||
helpers.loadScript(redirects[script]);
|
helpers.loadScript(redirects[script]);
|
||||||
}
|
}
|
||||||
} else if (script) {
|
} else if (script) {
|
||||||
if (! helpers.loadScript(script)) {
|
if (! helpers.loadScript(script)) {
|
||||||
window.stop();
|
window.stop();
|
||||||
window.location.href = helpers.baseurl + '404.html';
|
window.location.href = helpers.baseurl + '/404.html';
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
helpers.loadScript('jsinfo');
|
helpers.loadScript('jsinfo');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user