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
|
||||
layout: welcome
|
||||
redirect_from:
|
||||
- /index2.html
|
||||
- /welcome.html
|
||||
---
|
||||
|
||||
|
@ -65,6 +65,7 @@ colour = helpers.escapeHTML(colour);
|
||||
// Get the image URL
|
||||
if (img) {
|
||||
// More code to support legacy options
|
||||
var url = helpers.url + '/images/';
|
||||
switch (img) {
|
||||
case "1": // The older format had '1-6',
|
||||
case "2": // not xmas[n] and birthday[n].
|
||||
@ -72,11 +73,11 @@ if (img) {
|
||||
case "4": // used to be a Christmas
|
||||
case "5": // card generator.
|
||||
case "6":
|
||||
imgurl = helpers.url + "/images/xmas" + img + ".jpg";
|
||||
imgurl = url + 'xmas' + img + '.jpg';
|
||||
break;
|
||||
default:
|
||||
if (img) {
|
||||
imgurl = helpers.url + "/images/" + img + ".jpg";
|
||||
imgurl = url + img + ".jpg";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -26,14 +26,18 @@ var redirects = {
|
||||
if (redirects[script]) {
|
||||
if (redirects[script].indexOf('/') > -1) {
|
||||
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 {
|
||||
helpers.loadScript(redirects[script]);
|
||||
}
|
||||
} else if (script) {
|
||||
if (! helpers.loadScript(script)) {
|
||||
window.stop();
|
||||
window.location.href = helpers.baseurl + '404.html';
|
||||
window.location.href = helpers.baseurl + '/404.html';
|
||||
};
|
||||
} else {
|
||||
helpers.loadScript('jsinfo');
|
||||
|
Loading…
x
Reference in New Issue
Block a user