diff --git a/structure/OshbVerse/Script/ReferenceLocation.js b/structure/OshbVerse/Script/ReferenceLocation.js index db0a3db..4e95e15 100644 --- a/structure/OshbVerse/Script/ReferenceLocation.js +++ b/structure/OshbVerse/Script/ReferenceLocation.js @@ -18,8 +18,17 @@ refLocation = function() { results; if (url.length > 75) {return parts;} // Excessively long URL. results = url.search.match(/b=(\w+)/); - if (results && results[1] && sblNames.indexOf(results[1]) >= 0) { - parts.book = results[1]; + if (results && results[1]) { + if (sblNames.indexOf(results[1]) >= 0) { + parts.book = results[1]; + } else { + mtNum = parseInt(results[1]); + if (mtNum > 0 && mtNum < 40) { + parts.book = sblNames[mtNum - 1]; + } else { + return parts; // Unknown book number. + } + } } else { return parts; // Unknown book abbreviation. } diff --git a/structure/OshbVerse/readme.md b/structure/OshbVerse/readme.md index 5f7396a..e77e3a3 100644 --- a/structure/OshbVerse/readme.md +++ b/structure/OshbVerse/readme.md @@ -29,7 +29,8 @@ Several new components have been added to facilitate the popup display, and interpretation of the cantillation marks. Altogether, we have: - ReferenceLocation.js (Added 8/2/2019) manages URL locations, to - make and process the link. + make and process the link. Expanded 8/1/2020, to accept the MT book + number, as well as the SBL abbreviation, in the URL. - AccentCatalog.js catalogs the accents by type and scope. @@ -70,6 +71,7 @@ The OshbVerse demo is licensed under a license. For attribution purposes, credit the Open Scriptures Hebrew Bible Project. +Updated August 1, 2020 Updated August 2, 2019 Updated June 9, 2018 Updated June 22, 2017