diff --git a/www/index.html b/www/index.html
index 68776166..d5021b2e 100644
--- a/www/index.html
+++ b/www/index.html
@@ -60,8 +60,8 @@ License:
It's only a proof of concept so far : there are many many ways this could be enhanced (suggestions and patches are welcome : the source code is on github). In particular :
The performance should be optimized when reading an article
-
Searches are not always very accurate
-
The links inside an article do not work well
+
Some searches (starting with prefix "a" for example) do not give any result where they should
+
The links inside an article do not work very well
On a real device (with small memory) and a normal dump, reading an article crashes because it loads too many things in memory
It is hardly usable on a device because the buttons and inputs are too small
@@ -77,11 +77,7 @@ License:
Choose a title from the filtered list :
-
-
-
-
diff --git a/www/js/app.js b/www/js/app.js
index 4601a2ef..a31843a7 100644
--- a/www/js/app.js
+++ b/www/js/app.js
@@ -27,9 +27,6 @@ define(function(require) {
$('#searchTitles').on('click', function(e) {
searchTitlesFromPrefix($('#prefix').val());
});
- $('#toggleDebug').on('click', function(e) {
- switchDebugOnOff();
- });
$('#readData').on('click', function(e) {
findTitleFromTitleIdAndLaunchArticleRead($('#titleList').val());
});
@@ -65,32 +62,6 @@ define(function(require) {
$('#titleFile').on('change', setLocalArchiveFromFileSelect);
}
- var debugOn = false;
-
- /**
- * Print the given string inside the debug zone
- *
- * @param string
- */
- function debug(string) {
- if (debugOn) {
- document.getElementById("debugTextarea").value += string + "\n";
- }
- }
-
- /**
- * Switch debug mode On/Off
- */
- function switchDebugOnOff() {
- if (debugOn == true) {
- debugOn = false;
- $('#debugZone').hide();
- } else {
- debugOn = true;
- $('#debugZone').show();
- }
- }
-
function setLocalArchiveFromFileSelect() {
dataFiles=document.getElementById('dataFiles').files;
titleFile=document.getElementById('titleFile').files[0];
diff --git a/www/js/lib/evopedia.js b/www/js/lib/evopedia.js
index ec9c5bed..c52c79da 100644
--- a/www/js/lib/evopedia.js
+++ b/www/js/lib/evopedia.js
@@ -346,6 +346,10 @@ define(function(require) {
reader.onload = function(e) {
var binaryTitleFile = e.target.result;
var byteArray = new Uint8Array(binaryTitleFile);
+
+ if (byteArray.length==0) {
+ throw "Unable to find redirected article : offset "+title.blockStart+" not found in title file";
+ }
var redirectedTitle = title;
redirectedTitle.fileNr = byteArray[2];