From 10d42f161424978bc790bdc69c63f73a2ff72d9e Mon Sep 17 00:00:00 2001 From: Rupert Hausberger Date: Thu, 17 Jan 2013 20:12:03 +0100 Subject: [PATCH] update 0.8.0 --- index.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index fd119e8..de1798f 100644 --- a/index.js +++ b/index.js @@ -145,7 +145,7 @@ const db = [ ['Turrican II - The Final Fight', 'Rainbow Arts', '1991', ['Turrican II - The Final Fight (Disk 1).adf', 'Turrican II - The Final Fight (Disk 2).adf', - false, false], [false, true], + false, false], [true, true], [true, 16, 17, false], [], [['Fire-beam','Hold Fire 1'],['Roll on floor', 'Down-arrow + Fire 1'],['Bomb', 'Fire 2'],['Super-Bomb', 'Fire 1 + Fire 2']], false ], ['Wings of Death', 'Thalion', '1990', @@ -1089,10 +1089,14 @@ function init() { setSimpleConfig(); - if (window.location.hash.length > 0) { - var name = urldecode(window.location.hash.substr(1)); + if (window.location.hash.length > 1) { var start = false; - + var name = urldecode(window.location.hash.substr(1)); + while (true) { + var tmp = name.replace('_', ' '); + if (tmp == name) break; + name = tmp; + } for (var i = 0; i < db[0].length; i++) { if (db[0][i][0] == name) { document.getElementById('cfg_game')[i+1].selected = true; @@ -1123,9 +1127,15 @@ function start() { if (mode == 0) { var item = dbNum > 0 ? db[dbGrp - 1][dbNum - 1] : null; - if (item) - window.location.hash = item[0]; - else + if (item) { + var name = item[0]; + while (true) { + var tmp = name.replace(' ', '_'); + if (tmp == name) break; + name = tmp; + } + window.location.hash = name; + } else window.location.hash = ''; } else window.location.hash = '';