MediaWiki:BibleGet.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 11: Line 11:
if(bibleQuoteCollection.includes(version+"/"+ref)){
if(bibleQuoteCollection.includes(version+"/"+ref)){
//we already have an instance of this bible quote, avoid creating new div
//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+"']");
$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(){
$span.on('mouseenter', function(){
$bGetTIP.show();
$bGetTIP.show();
Line 44: Line 47:
if(data.hasOwnProperty('html')){
if(data.hasOwnProperty('html')){
let $bGetTIP = $('<div>', {
let $bGetTIP = $('<div>', {
"class": "bibleGetQuote",  
"class": "bibleGetQuote",
"data-version": version,
"data-ref": ref,
"data-ref": ref,
"html": data.html
"html": data.html