Overview
| Comment: | [graphspell][js] console.log() for debugging |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | graphspell |
| Files: | files | file ages | folders |
| SHA3-256: |
31905c2c2f74dda88a95c85975f1b342 |
| User & Date: | olr on 2018-08-07 09:03:22 |
| Other Links: | manifest | tags |
Context
|
2018-08-07
| ||
| 12:40 | [tb] code cleaning: fix import (not necessary for TextDecoder, TextEncoder) check-in: 8ea07ff627 user: olr tags: trunk, tb | |
| 09:03 | [graphspell][js] console.log() for debugging check-in: 31905c2c2f user: olr tags: trunk, graphspell | |
| 09:02 | [tb][bug] lexicon editor: wrong filename check-in: db6c099b46 user: olr tags: trunk, tb | |
Changes
Modified graphspell-js/helpers.js from [dded3e5e90] to [6ccb02c60d].
| ︙ | ︙ | |||
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
},
loadFile: function (spf) {
// load ressources in workers (suggested by Mozilla extensions reviewers)
// for more options have a look here: https://gist.github.com/Noitidart/ec1e6b9a593ec7e3efed
// if not in workers, use sdk/data.load() instead
try {
let xRequest;
xRequest = new XMLHttpRequest();
xRequest.open('GET', spf, false); // 3rd arg is false for synchronous, sync is acceptable in workers
xRequest.overrideMimeType('text/json');
xRequest.send();
return xRequest.responseText;
}
| > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
},
loadFile: function (spf) {
// load ressources in workers (suggested by Mozilla extensions reviewers)
// for more options have a look here: https://gist.github.com/Noitidart/ec1e6b9a593ec7e3efed
// if not in workers, use sdk/data.load() instead
try {
console.log("loadFile: " + spf);
let xRequest;
xRequest = new XMLHttpRequest();
xRequest.open('GET', spf, false); // 3rd arg is false for synchronous, sync is acceptable in workers
xRequest.overrideMimeType('text/json');
xRequest.send();
return xRequest.responseText;
}
|
| ︙ | ︙ |
Modified graphspell-js/ibdawg.js from [c644dcfbc9] to [624ac3b2e2].
| ︙ | ︙ | |||
101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
oData = JSON.parse(helpers.loadFile(sURL));
} else {
oData = param1;
}
Object.assign(this, oData);
}
catch (e) {
throw Error("# Error. File not found or not loadable.\n" + e.message + "\n");
}
/*
Properties:
sName, nCompressionMethod, sHeader, lArcVal, nArcVal, sByDic, sLang, nChar, nBytesArc, nBytesNodeAddress,
nEntry, nNode, nArc, nAff, cStemming, nTag, dChar, nBytesOffset,
*/
| > > > | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
oData = JSON.parse(helpers.loadFile(sURL));
} else {
oData = param1;
}
Object.assign(this, oData);
}
catch (e) {
console.error(e);
console.log("path: " + sPath);
console.log("dic:" + param1.slice(0, 1000));
throw Error("# Error. File not found or not loadable.\n" + e.message + "\n");
}
/*
Properties:
sName, nCompressionMethod, sHeader, lArcVal, nArcVal, sByDic, sLang, nChar, nBytesArc, nBytesNodeAddress,
nEntry, nNode, nArc, nAff, cStemming, nTag, dChar, nBytesOffset,
*/
|
| ︙ | ︙ |