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 = [];
(function($,mw){
$(document).ready(function(){
if( $('.bibleQuoteRef').length > 0 ){
console.log("There are " + $('.bibleQuoteRef').length + " bible quotes on this page");
$('.bibleQuoteRef').each(function(){
let $span = $(this);
let version = $(this).attr('data-version');
let ref = $(this).attr('data-ref');
if(bibleQuoteCollection.includes(version+"/"+ref)){
//we already have an instance of this bible quote, avoid creating new div
console.log('We seem to have already dealt with the same bible quote on this page: '+version+'/'+ref);
$bGetTIP = $("div[data-version='"+version+"'][data-ref='"+ref+"']");
console.log('In fact there is already ' + $bGetTIP.length + ' div at the bottom of the page with this same bible quote');
$span.on('mouseenter', function(){
$bGetTIP.show();
let top = $span.offset().top;
let left = $span.offset().left + $span.outerWidth() + 15;
$bGetTIP.css({"top":top,"left":left});
});
000
1:0
Return to MediaWiki:BibleGet.js.