MediaWiki:BibleGet.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 98: Line 98:
this.nodeType === 1 && (  
this.nodeType === 1 && (  
jQuery(this).hasClass('pof') || jQuery(this).hasClass('po') || jQuery(this).hasClass('pol') || jQuery(this).hasClass('pos') || jQuery(this).hasClass('poif') || jQuery(this).hasClass('poi') || jQuery(this).hasClass('poil')  
jQuery(this).hasClass('pof') || jQuery(this).hasClass('po') || jQuery(this).hasClass('pol') || jQuery(this).hasClass('pos') || jQuery(this).hasClass('poif') || jQuery(this).hasClass('poi') || jQuery(this).hasClass('poil')  
) && (
) /*&& (
jQuery(this).parent('.verseText').prevAll('.verseText').length === 0 //is the first .verseText of a chapter
jQuery(this).parent('.verseText').prevAll('.verseText').length === 0 //is the first .verseText of a chapter
||
||
Line 104: Line 104:
return this.nodeType === 1 && ( jQuery(this).hasClass('pof') || jQuery(this).hasClass('po') || jQuery(this).hasClass('pol') || jQuery(this).hasClass('pos') || jQuery(this).hasClass('poif') || jQuery(this).hasClass('poi') || jQuery(this).hasClass('poil') )
return this.nodeType === 1 && ( jQuery(this).hasClass('pof') || jQuery(this).hasClass('po') || jQuery(this).hasClass('pol') || jQuery(this).hasClass('pos') || jQuery(this).hasClass('poif') || jQuery(this).hasClass('poi') || jQuery(this).hasClass('poil') )
})
})
)  
) */
)  
)  
}).css({"display":"inline-block","position":"relative","left":function(index){ return "-"+jQuery(this).parent('.verseText').prev('.verseNum').outerWidth(true)+"px"; } });     
}).css({"display":"inline-block","position":"relative","left":function(index){ return "-"+jQuery(this).parent('.verseText').prev('.verseNum').outerWidth(true)+"px"; } });     
Line 115: Line 115:
//THEN change the css display of that (first node) to "inline-block" and left position it removing the width of the span with the verse number  
//THEN change the css display of that (first node) to "inline-block" and left position it removing the width of the span with the verse number  
//TODO: shouldn't we do this any time it's the first node within a verseText node, since it follows a verseNum?
jQuery(this).contents().first().filter(function(){
jQuery(this).contents().first().filter(function(){