mirror of
https://gitlab.com/walljm/dynamicbible.git
synced 2025-07-26 17:10:11 -04:00
- minor cleanup of unused vars, formatting
This commit is contained in:
parent
b896020dc2
commit
12f9e1194d
@ -28,7 +28,6 @@ function parseReference(ref, r) {
|
||||
|
||||
function parseBook(ref, data, errAcc) {
|
||||
ref = ref.toLowerCase().trim();
|
||||
var bibleNames = new Object;
|
||||
var fbook = ref.substring(0, ref.search(/\w\s+\d/i)+1);
|
||||
var rest = ref.slice(ref.search(/\w\s+\d/i)+1);
|
||||
|
||||
@ -439,7 +438,6 @@ function parseBook(ref, data, errAcc) {
|
||||
|
||||
function parseFirstNum(ref, r, errAcc) {
|
||||
ref = ref.ltrim();
|
||||
var ch = "";
|
||||
var found = false;
|
||||
for (var i = 0; i <= ref.length; i++) {
|
||||
var c = ref.charAt(i);
|
||||
@ -463,7 +461,6 @@ function parseFirstNum(ref, r, errAcc) {
|
||||
|
||||
function parseSecondNum(ref, r, errAcc, skipColon) {
|
||||
ref = ref.toLowerCase().ltrim();
|
||||
var vs = "";
|
||||
if (!skipColon) {
|
||||
if (ref[0] != ":") {
|
||||
return ref;
|
||||
@ -528,6 +525,7 @@ function maybeParseRangeSep(ref, r, errAcc) {
|
||||
return "";
|
||||
});
|
||||
}
|
||||
|
||||
function Reference(ref)
|
||||
{
|
||||
r = {
|
||||
@ -540,6 +538,7 @@ function Reference(ref)
|
||||
second: ''
|
||||
}
|
||||
};
|
||||
|
||||
// First collect all our tokens so to speak
|
||||
parseReference(ref.toLowerCase().trim(), r);
|
||||
this.book = r.start.book;
|
||||
@ -548,6 +547,7 @@ function Reference(ref)
|
||||
this.startchapter = r.start.first;
|
||||
this.endchapter = r.start.first;
|
||||
this.startverse = '1';
|
||||
|
||||
// Then start our statemachine.
|
||||
// Determine start verse
|
||||
if (r.start.second != '') {
|
||||
|
@ -3,18 +3,19 @@ function SortNumeric(x, y)
|
||||
return x - y
|
||||
}
|
||||
|
||||
String.prototype.trim = function()
|
||||
{
|
||||
String.prototype.trim = function()
|
||||
{
|
||||
return this.replace(/^\s+|\s+$/g, "");
|
||||
}
|
||||
String.prototype.ltrim = function()
|
||||
{
|
||||
}
|
||||
String.prototype.ltrim = function()
|
||||
{
|
||||
return this.replace(/^\s+/, "");
|
||||
}
|
||||
String.prototype.rtrim = function()
|
||||
{
|
||||
}
|
||||
String.prototype.rtrim = function()
|
||||
{
|
||||
return this.replace(/\s+$/, "");
|
||||
}
|
||||
}
|
||||
|
||||
function Traverse(node, testament)
|
||||
{
|
||||
try
|
||||
@ -122,7 +123,6 @@ function Search(sv)
|
||||
// its a verse reference.
|
||||
else
|
||||
{
|
||||
var passage = "";
|
||||
if (q.trim() != "")
|
||||
{
|
||||
var myref = new Reference(q.trim());
|
||||
@ -147,7 +147,6 @@ function Search(sv)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var Settings = {
|
||||
Load: function()
|
||||
{
|
||||
@ -276,6 +275,7 @@ var Bible = {
|
||||
try
|
||||
{
|
||||
var r = "";
|
||||
|
||||
// make the end verse pretty.
|
||||
var tvs = cs[cs.length - 1].vss.length;
|
||||
|
||||
@ -303,10 +303,16 @@ var Bible = {
|
||||
if (v.w[w].s != undefined)
|
||||
{
|
||||
var strongs_pre = "";
|
||||
if (testament == "old") { strongs_pre = "H"; }
|
||||
if (testament == "new") {strongs_pre = "G"; }
|
||||
if (testament == "old") {
|
||||
strongs_pre = "H";
|
||||
}
|
||||
if (testament == "new") {
|
||||
strongs_pre = "G";
|
||||
}
|
||||
var sp = "";
|
||||
if (v.w[w].t.substr(v.w[w].t.length-1) == " ") { sp = " "; }
|
||||
if (v.w[w].t.substr(v.w[w].t.length-1) == " ") {
|
||||
sp = " ";
|
||||
}
|
||||
r += "<a href='javascript:void();' class='hiddenlink' title='Strongs #: " + v.w[w].s + "'><span class='searchvalue' style='display:none'>" + strongs_pre + v.w[w].s + "</span>" + v.w[w].t.trim() + "</a>"+sp;
|
||||
}
|
||||
else
|
||||
|
@ -28,7 +28,6 @@ function parseReference(ref, r) {
|
||||
|
||||
function parseBook(ref, data, errAcc) {
|
||||
ref = ref.toLowerCase().trim();
|
||||
var bibleNames = new Object;
|
||||
var fbook = ref.substring(0, ref.search(/\w\s+\d/i)+1);
|
||||
var rest = ref.slice(ref.search(/\w\s+\d/i)+1);
|
||||
|
||||
@ -439,7 +438,6 @@ function parseBook(ref, data, errAcc) {
|
||||
|
||||
function parseFirstNum(ref, r, errAcc) {
|
||||
ref = ref.ltrim();
|
||||
var ch = "";
|
||||
var found = false;
|
||||
for (var i = 0; i <= ref.length; i++) {
|
||||
var c = ref.charAt(i);
|
||||
@ -463,7 +461,6 @@ function parseFirstNum(ref, r, errAcc) {
|
||||
|
||||
function parseSecondNum(ref, r, errAcc, skipColon) {
|
||||
ref = ref.toLowerCase().ltrim();
|
||||
var vs = "";
|
||||
if (!skipColon) {
|
||||
if (ref[0] != ":") {
|
||||
return ref;
|
||||
@ -528,6 +525,7 @@ function maybeParseRangeSep(ref, r, errAcc) {
|
||||
return "";
|
||||
});
|
||||
}
|
||||
|
||||
function Reference(ref)
|
||||
{
|
||||
r = {
|
||||
@ -540,6 +538,7 @@ function Reference(ref)
|
||||
second: ''
|
||||
}
|
||||
};
|
||||
|
||||
// First collect all our tokens so to speak
|
||||
parseReference(ref.toLowerCase().trim(), r);
|
||||
this.book = r.start.book;
|
||||
@ -548,6 +547,7 @@ function Reference(ref)
|
||||
this.startchapter = r.start.first;
|
||||
this.endchapter = r.start.first;
|
||||
this.startverse = '1';
|
||||
|
||||
// Then start our statemachine.
|
||||
// Determine start verse
|
||||
if (r.start.second != '') {
|
||||
|
34
js/common.js
34
js/common.js
@ -3,18 +3,19 @@ function SortNumeric(x, y)
|
||||
return x - y
|
||||
}
|
||||
|
||||
String.prototype.trim = function()
|
||||
{
|
||||
String.prototype.trim = function()
|
||||
{
|
||||
return this.replace(/^\s+|\s+$/g, "");
|
||||
}
|
||||
String.prototype.ltrim = function()
|
||||
{
|
||||
}
|
||||
String.prototype.ltrim = function()
|
||||
{
|
||||
return this.replace(/^\s+/, "");
|
||||
}
|
||||
String.prototype.rtrim = function()
|
||||
{
|
||||
}
|
||||
String.prototype.rtrim = function()
|
||||
{
|
||||
return this.replace(/\s+$/, "");
|
||||
}
|
||||
}
|
||||
|
||||
function Traverse(node, testament)
|
||||
{
|
||||
try
|
||||
@ -122,7 +123,6 @@ function Search(sv)
|
||||
// its a verse reference.
|
||||
else
|
||||
{
|
||||
var passage = "";
|
||||
if (q.trim() != "")
|
||||
{
|
||||
var myref = new Reference(q.trim());
|
||||
@ -147,7 +147,6 @@ function Search(sv)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var Settings = {
|
||||
Load: function()
|
||||
{
|
||||
@ -276,6 +275,7 @@ var Bible = {
|
||||
try
|
||||
{
|
||||
var r = "";
|
||||
|
||||
// make the end verse pretty.
|
||||
var tvs = cs[cs.length - 1].vss.length;
|
||||
|
||||
@ -303,10 +303,16 @@ var Bible = {
|
||||
if (v.w[w].s != undefined)
|
||||
{
|
||||
var strongs_pre = "";
|
||||
if (testament == "old") { strongs_pre = "H"; }
|
||||
if (testament == "new") {strongs_pre = "G"; }
|
||||
if (testament == "old") {
|
||||
strongs_pre = "H";
|
||||
}
|
||||
if (testament == "new") {
|
||||
strongs_pre = "G";
|
||||
}
|
||||
var sp = "";
|
||||
if (v.w[w].t.substr(v.w[w].t.length-1) == " ") { sp = " "; }
|
||||
if (v.w[w].t.substr(v.w[w].t.length-1) == " ") {
|
||||
sp = " ";
|
||||
}
|
||||
r += "<a href='javascript:void();' class='hiddenlink' title='Strongs #: " + v.w[w].s + "'><span class='searchvalue' style='display:none'>" + strongs_pre + v.w[w].s + "</span>" + v.w[w].t.trim() + "</a>"+sp;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user