View source for MediaWiki:BibleGet.js
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
//avoid duplicate bibleQuote divs
let bibleQuoteCollection = [];
let domCheckInterval = [];
let ajaxCount = 0;
let BibleQuotesDomElements = [];
(function($,mw){
$(document).ready(function(){
if( $('.bibleQuoteRef').length > 0 ){
console.log("There are " + $('.bibleQuoteRef').length + " bible quotes on this page");
$('.bibleQuoteRef').each(function(){
let $el = $(this);
let version = $(this).attr('data-version');
let ref = $(this).attr('data-ref');
let inline = ($(this).attr('data-inline') == "true");
console.log("data-ref = " + ref + " data-inline = " + inline);
if(bibleQuoteCollection.includes(version+"/"+ref)){
//we already have an instance of this bible quote, avoid creating new div
//This will also save us an ajax call
console.log('We seem to have already dealt with the same bible quote on this page: '+version+'/'+ref);
//however since the ajax calls are asynchronous, we probably won't have the actual div at the bottom of the page yet
//so let's look for it inside the mouseover event
if(inline){
104
1:0
Return to MediaWiki:BibleGet.js.