MediaWiki:BibleGet.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 17: Line 17:
console.log("data returned from ajax request:");
console.log("data returned from ajax request:");
console.log(data);
console.log(data);
/*
if(data.hasOwnProperty('html')){
let $bGetTIP = $('<div>', {
let $bGetTIP = $('<div>', {
"class": "bibleGetQuote",  
"class": "bibleGetQuote",  
"data-ref": ref,
"data-ref": ref,
"html": data
"html": data.html
});
});
$bGetTIP.append($('<p>',{"text": " — powered by BibleGet I/O","css":{"font-size":".9em","text-align":"right","font-style":"italic","font-weight":"bold","color":"gray"}}));
$bGetTIP.append($('<p>',{"text": " — powered by BibleGet I/O","css":{"font-size":".9em","text-align":"right","font-style":"italic","font-weight":"bold","color":"gray"}}));
$('body').append($bGetTIP);
$('body').append($bGetTIP);
$span.on('mouseenter', function(){
$span.on('mouseenter', function(){
$bGetTIP.show();
$bGetTIP.show();
let top = $span.offset().top;
let top = $span.offset().top;
let left = $span.offset().left + $span.outerWidth() + 15;
let left = $span.offset().left + $span.outerWidth() + 15;
$bGetTIP.css({"top":top,"left":left});
$bGetTIP.css({"top":top,"left":left});
});
});
*/
/*
/*
$span.on('mousemove', function(){
$span.on('mousemove', function(){
let top = $span.offset().top;
let top = $span.offset().top;
let left = $span.offset().left + $span.outerWidth();
let left = $span.offset().left + $span.outerWidth();
$bGetTIP.css({"top":top,"left":left});
$bGetTIP.css({"top":top,"left":left});
});
});
*/
*/
/*
$span.on('mouseleave', function(){
$span.on('mouseleave', function(){
$bGetTIP.fadeOut('slow');
$bGetTIP.fadeOut('slow');
});
});
}
console.log("Injected Bible quote for ref = " + ref + " with value obtained from BibleGet service:");
//console.log("Injected Bible quote for ref = " + ref + " with value obtained from BibleGet service:");
*/
},
},
error: function(jqXHR, textStatus, errorThrown){
error: function(jqXHR, textStatus, errorThrown){