PageSourceSearch

https://www.biblicalunitarian.com/wp-content/plugins/revscript_for_BU//script/firefindvers.js?ver=7.0.6

js biblicalunitarian.com collected 2026-10-02 05:40:46 UTC 4,812 bytes, 159 lines download raw bytes

1findvers.startNodeId = 'content-area';
2findvers.remoteURL = 'https://revbible.com';
3findvers.navigat = false;
4
5//alert('hi');
6
7addLoadEvent(findvers.scan);
8addLoadEvent(initpoppopup);
9
10function addLoadEvent(func) {
11  //https://gist.github.com/dciccale/4087856
12  var b=document,c='addEventListener';
13  b[c]?b[c]('DOMContentLoaded',func):window.attachEvent('onload',func);
14}
15
16//
17// popups
18// hopefully it will also replace a bunch of code in findvers and findcomm
19// need to encapsulate it somehow
20//
21var popwin, popdoc, popbody, popp, popcheckPosTimeout, popdivShowTimer, jsloggedoffset;
22
23//function $(el) {
24//  return document.getElementById(el);
25//}
26function pophandleLinkMouseOut() {
27  clearTimeout(popdivShowTimer);
28  delete popdivShowTimer;
29  popstartPositionTimer();
30}
31
32function poppositionPopup(target) {
33  var viewport = popgetWindowSize();
34  var pos = popgetPosition(target);
35  var x = pos.left - (popp.outer.offsetWidth/2);
36  var y = pos.top - popp.outer.clientHeight;
37  if (x<0) {x=4;}
38  else if (x+10+popp.outer.clientWidth >= viewport.width) {x = viewport.width - popp.outer.clientWidth - 16;}
39
40  if (y<0 || (y<(popgetScroll().y))) {y = pos.top + target.offsetHeight+36-jsloggedinoffset;} // above the screen
41  else{y = y+24-jsloggedinoffset;}
42
43  popp.outer.style.top = y + 'px';
44  popp.outer.style.left = x + 'px';
45}
46
47function pophandlePopupMouseOver() {popclearPositionTimer();}
48function pophandlePopupMouseOut() {popstartPositionTimer();}
49function popstartPositionTimer() {popcheckPosTimeout = setTimeout(pophidePopup, 200);}
50function popclearPositionTimer() {
51  clearTimeout(popcheckPosTimeout);
52  delete popcheckPosTimeout;
53}
54function pophidePopup() {popp.outer.style.display = 'none';}
55
56function popgetPosition(node) {
57  var curtop = 0;
58  if (node.offsetParent) {
59    do{curtop += node.offsetTop;}
60    while (node = node.offsetParent);
61  }
62  return {left:cursorX, top:curtop};
63}
64
65function popgetWindowSize() {
66  var width = 0,
67      height = 0;
68  if( typeof( popwin.innerWidth ) == 'number' ) {
69    // Non-IE
70    width = popwin.innerWidth;
71    height = popwin.innerHeight;
72  } else if( popdoc.documentElement && ( popdoc.documentElement.clientWidth || popdoc.documentElement.clientHeight ) ) {
73    //IE 6+ in 'standards compliant mode'
74    width = popdoc.documentElement.clientWidth;
75    height = popdoc.documentElement.clientHeight;
76  } else if( popbody && ( popbody.clientWidth || popbody.clientHeight ) ) {
77    //IE 4 compatible
78    width = popbody.clientWidth;
79    height = popbody.clientHeight;
80  }
81  return {width:width, height: height};
82}
83
84function popgetScroll() {
85  var scrOfX = 0,
86      scrOfY = 0;
87  if( popbody && ( popbody.scrollLeft || popbody.scrollTop ) ) {
88    //DOM compliant
89    scrOfY = popbody.scrollTop;
90    scrOfX = popbody.scrollLeft;
91  } else if( popdoc.documentElement && ( popdoc.documentElement.scrollLeft || popdoc.documentElement.scrollTop ) ) {
92    //IE6 standards compliant mode
93    scrOfY = popdoc.documentElement.scrollTop;
94    scrOfX = popdoc.documentElement.scrollLeft;
95  } else if( typeof( popwin.pageYOffset ) == 'number' ) {
96    //Netscape compliant
97    scrOfY = popwin.pageYOffset;
98    scrOfX = popwin.pageXOffset;
99  }
100  return {x:scrOfX, y:scrOfY };
101}
102
103function popaddEvent(obj,name,fxn) {
104  if(obj.attachEvent){
105    obj.attachEvent('on' + name, fxn);
106  }else if(obj.addEventListener){
107    obj.addEventListener(name, fxn, false);
108  }else{
109    var __ = obj['on' + name];
110    obj['on' + name] = function() {fxn();__();
111    };
112  }
113}
114
115function initpoppopup(){
116  popwin = window;
117  popdoc = document
118  popbody = popdoc.body;
119  // create popup
120  popp = {outer: popdoc.createElement('div')};
121  var parts = ['header','content'],
122      i, il, div, name, node = null;
123  popp.outer.className = 'findvers_popup_outer';
124  // build all the parts
125  for (i=0,il=parts.length; i<il; i++) {
126    name = parts[i];
127    div = popdoc.createElement('div');
128    div.className = 'findvers_popup_' + name;
129    popp.outer.appendChild(div);
130    popp[name] = div;
131  }
132  popp.header.style.whiteSpace='nowrap';
133  popbody.appendChild(popp.outer);
134  popaddEvent(popp.outer,'mouseover',pophandlePopupMouseOver);
135  popaddEvent(popp.outer,'mouseout',pophandlePopupMouseOut);
136  jsloggedinoffset = ((document.body.classList.contains('logged-in'))?0:32);
137}
138
139function getCursorX(e) {
140  var ret;
141  e = e || window.event;
142  if (e.pageX || e.pageY) {
143    ret = e.pageX;
144  }else{
145    ret = e.clientX +
146          (document.documentElement.scrollLeft ||
147          document.body.scrollLeft) -
148          document.documentElement.clientLeft;
149  }
150  return ret;
151}
152
153var cursorX=0;
154document.onmousemove = function(e){
155cursorX = getCursorX(e);
156}
157
158
159

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.