var screenshots = {
"screenshot-stationlist.png" : "The Station List View",
"screenshot-stationview.png" : "The Station Departures View",
+ "screenshot-stationlist-menu.png" : "The Station List Menu",
+ "screenshot-stationview-menu.png" : "The Station Departures Menu",
};
function generate_div(value, index, array)
var p1Element = document.createElement('div');
var p2Element = p1Element.cloneNode(true);
+ var aElement = document.createElement('a');
+ aElement.setAttribute('href', index);
+
var imgElement = document.createElement('img');
imgElement.setAttribute('src', index);
var captionElement = document.createTextNode(value);
- p1Element.appendChild(imgElement);
+ p1Element.appendChild(aElement);
+ aElement.appendChild(imgElement);
p2Element.appendChild(captionElement);
screenshotDiv.appendChild(p1Element);
generate_div(screenshots[key], key, screenshots);
}
-window.addEventListener('load', build_screenshot_list);
+if (window.addEventListener) {
+ window.addEventListener('load', build_screenshot_list, false);
+} else if (window.attachEvent) {
+ window.attachEvent('onload', build_screenshot_list);
+}