diff --git a/js/utils.js b/js/utils.js index 240c50e..ecbbb5b 100644 --- a/js/utils.js +++ b/js/utils.js @@ -280,7 +280,10 @@ function getFormaContext(formaid, numversi=3) { var offset=0; - + if (parseInt(formaid) < 33373) { + offset=parseInt(formaid) + } + if (parseInt(formaid) > 33373 && parseInt(formaid) < 66588) { listaforme = formeseconda; cantica = 2; @@ -301,13 +304,14 @@ function getFormaContext(formaid, numversi=3) { maxpos = listaforme.length - 1 var pos = 0 - const startindex=Math.max(0, (offset-1)) + var startindex=Math.max(0, (offset-45)) + console.log('Forma id: '+formaid+' startindex '+ startindex+' offset '+offset+' ('+cantica+')') for (i=startindex; i