diff --git a/www/js/lib/filecache.js b/www/js/lib/filecache.js index 4802f0b2..7eabe455 100644 --- a/www/js/lib/filecache.js +++ b/www/js/lib/filecache.js @@ -183,4 +183,4 @@ define([], function() { return { read: read }; -}); +}); \ No newline at end of file diff --git a/www/js/lib/xzdec_wrapper.js b/www/js/lib/xzdec_wrapper.js index 658d9c95..8107f8c3 100644 --- a/www/js/lib/xzdec_wrapper.js +++ b/www/js/lib/xzdec_wrapper.js @@ -54,8 +54,6 @@ define(rqDefXZ, function(uiUtil) { var xzdec; XZ().then(function (instance) { - // TEST ERROR CODE: UNCOMMENT TO TEST AND REMOVE BEFORE MERGE - // throw params.decompressorAPI.assemblerMachineType + ' broken!'; xzdec = instance; }).catch(function (err) { if (params.decompressorAPI.assemblerMachineType === 'ASM') { @@ -67,8 +65,6 @@ define(rqDefXZ, function(uiUtil) { XZ = null; require(['xzdec-asm'], function () { XZ().then(function (instance) { - // TEST ERROR CODE: UNCOMMENT TO TEST AND REMOVE BEFORE MERGE - // throw params.decompressorAPI.assemblerMachineType + ' broken!'; xzdec = instance; }).catch(function (err) { uiUtil.reportAssemblerErrorToAPIStatusPanel('XZ', err); diff --git a/www/js/lib/zimArchive.js b/www/js/lib/zimArchive.js index 8063dce9..57496372 100644 --- a/www/js/lib/zimArchive.js +++ b/www/js/lib/zimArchive.js @@ -211,8 +211,8 @@ define(['zimfile', 'zimDirEntry', 'util', 'utf8'], })); // Get the full array of combinations to check number of combinations var fullCombos = util.removeDuplicateStringsInSmallArray(util.allCaseFirstLetters(prefix, 'full')); - // Put cap on exponential number of combinations (five words = 3^6 = 243 combinations) - search.type = fullCombos.length < 250 ? 'full' : 'basic'; + // Put cap on exponential number of combinations (five words = 3^5 = 243 combinations) + search.type = fullCombos.length < 300 ? 'full' : 'basic'; // We have to remove duplicate string combinations because util.allCaseFirstLetters() can return some combinations // where uppercase and lowercase combinations are exactly the same, e.g. where prefix begins with punctuation // or currency signs, for languages without case, or where user-entered case duplicates calculated case @@ -288,7 +288,7 @@ define(['zimfile', 'zimDirEntry', 'util', 'utf8'], * * @param {String} prefix The case-sensitive value against which dirEntry titles (or url) will be compared * @param {Object} search The appstate.search object (for comparison, so that we can cancel long binary searches) - * @param {Function} callback The function to call with the array of dirEntries with titles that begin with prefix + * @param {callbackDirEntryList} callback The function to call with the array of dirEntries with titles that begin with prefix * @param {Integer} startIndex The index number with which to commence the search, or null */ ZIMArchive.prototype.findDirEntriesWithPrefixCaseSensitive = function(prefix, search, callback, startIndex) { diff --git a/www/js/lib/zimfile.js b/www/js/lib/zimfile.js index a75bfa33..c9b80c18 100644 --- a/www/js/lib/zimfile.js +++ b/www/js/lib/zimfile.js @@ -40,6 +40,9 @@ * A global variable to track the assembler machine type and the last used decompressor (for reporting to the API panel) * This is populated in the Emscripten wrappers * @type {Object} + * @property {String} assemblerMachineType The assembler machine type supported and/or loaded by this app: 'ASM' or 'WASM' + * @property {String} decompressorLastUsed The decompressor that was last used to decode a compressed cluster (currently 'XZ' or 'ZSTD') + * @property {String} errorStatus A description of any detected error in loading a decompressor */ params.decompressorAPI = { assemblerMachineType: null, diff --git a/www/js/lib/zstddec_wrapper.js b/www/js/lib/zstddec_wrapper.js index 8b257cbe..f33f7527 100644 --- a/www/js/lib/zstddec_wrapper.js +++ b/www/js/lib/zstddec_wrapper.js @@ -102,8 +102,6 @@ define(rqDefZD, function(uiUtil) { }; ZD().then(function (inst) { - // TEST ERROR CODE: UNCOMMENT TO TEST AND REMOVE BEFORE MERGE - // throw params.decompressorAPI.assemblerMachineType + ' broken!'; instantiateDecoder(inst); }).catch(function (err) { if (params.decompressorAPI.assemblerMachineType === 'ASM') { @@ -115,8 +113,6 @@ define(rqDefZD, function(uiUtil) { ZD = null; require(['zstddec-asm'], function () { ZD().then(function (inst) { - // TEST ERROR CODE: UNCOMMENT TO TEST AND REMOVE BEFORE MERGE - // throw params.decompressorAPI.assemblerMachineType + ' broken!'; instantiateDecoder(inst); }).catch(function (err) { uiUtil.reportAssemblerErrorToAPIStatusPanel('ZSTD', err);