X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/9b34f6d9fa60d96025fe3835777f277b9cc002ad..1645f78531b64d0da285900056692309794cc600:/latinsample.js?ds=inline
diff --git a/latinsample.js b/latinsample.js
index fa6b0f1..846e500 100644
--- a/latinsample.js
+++ b/latinsample.js
@@ -3,6 +3,10 @@ function appendsample() {
for (var row of rows) {
// append sample column
var samplecol = row.getElementsByClassName('sample');
+ if (!this.value.length) {
+ row.removeChild(samplecol[0]);
+ continue;
+ }
if (samplecol.length) {
samplecol = samplecol[0];
}
@@ -35,17 +39,25 @@ function appendsample() {
else if (cols[28] && i && col == input.charCodeAt(i - 1) - 64) {
col = 28; // repetition char
}
-
- if (col < cols.length) {
- output += '' + (cols[col] || ' ') + '';
+ if (row.id == 'suetterlin' && col == 19) {
+ var final = input.length == i + 1 || input[i + 1] == ' ';
+ output += cols[col].split(' ')[final ? 1 : 0];
+ }
+ else if (col < cols.length) {
+ var final = cols[col] || ' ';
+ if (!/^