- minor cleanup of unused vars, formatting

This commit is contained in:
walljm 2013-04-09 11:53:04 -04:00
parent b896020dc2
commit 12f9e1194d
4 changed files with 52 additions and 40 deletions

View File

@ -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 != '') {

View File

@ -15,6 +15,7 @@ function SortNumeric(x, y)
{
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

View File

@ -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 != '') {

View File

@ -15,6 +15,7 @@ function SortNumeric(x, y)
{
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