1(function( $ ){ 2 $( document ).ready( function() { 3 /* Shinybox init - For old Ilo-Gallery */ 4 try { 5 if(jQuery(".gallery").length){ 6 7 /* Attach shinybox with the images urls only. */ 8 jQuery(".gallery a").each(function(i, v){ 9 10 //debugger; 11 var url; 12 var image_url = new RegExp('^(https|http|ftp)://.*(jpg|jpeg|png|gif|bmp)'); 13 14 jQuery(this).removeAttr('target'); 15 /*jQuery(this).click(function (e) { 16 e.preventDefault(); 17 });*/ 18 19 if( typeof jQuery(this).attr('href') == 'undefined'){ 20 url = jQuery(this).find('img').attr('src'); 21 jQuery(this).attr('href', url); 22 } 23 else{ 24 url = jQuery(this).attr('href'); 25 } 26 27 if(image_url.test(url)){ 28 var caption = jQuery(this).parent().parent().find('figcaption').text(); 29 jQuery(this).attr('title', caption); 30 jQuery(this).addClass('shinybox'); 31 jQuery(".shinybox").unbind('click').shinybox(); 32 } 33 }); 34 } 35 36 } catch(e) {} 37 38 39 /* Shinybox init - For new WP-Gallery Shortcodes -or- Editor Blocks */ 40 try { 41 if(jQuery(".wp-block-gallery").length){ 42 43 /* wrap all images of gallery in anchor tags, to make them work properly with shinybox */ 44 if( ! jQuery(".blocks-gallery-item figure").find('a').length){ 45 jQuery(".blocks-gallery-item figure img").each(function(i, v){ 46 jQuery(v).wrap("<a href='"+jQuery(v).attr('src')+"'></a>"); 47 }); 48 } 49 50 51 /* Attach shinybox with the images urls only. */ 52 jQuery(".blocks-gallery-item figure a").each(function(i, v){ 53 var image_url = new RegExp('^(https|http|ftp)://.*(jpg|jpeg|png|gif|bmp)'); 54 var url = jQuery(this).attr('href'); 55 if(image_url.test(url)){ 56 var caption = jQuery(this).parent().parent().find('figcaption').text(); 57 jQuery(this).attr('title', caption); 58 jQuery(this).addClass('shinybox'); 59 jQuery(".shinybox").unbind('click').shinybox(); 60 } 61 }); 62 } 63 64 } catch(e) {} 65 66 // iloblog post share customization for WP 67 jQuery('.oc_post_share').click(function() { 68 var elem = jQuery(this); 69 elem.parent().find('.jsShareMenu').toggle('slow'); 70 }); 71 72 jQuery(document).mouseup(function (e) 73 { 74 var container = jQuery(".jsShareMenu"); 75 76 var clickedArea = $(e.target).attr('class'); 77 78 // if the target of the click isn't the container nor a descendant of the container 79 if (!container.is(e.target) && container.has(e.target).length === 0 && clickedArea !== 'oc_post_share') 80 { 81 jQuery('.jsShareMenu').hide(); 82 } 83 }); 84 85 /* align container height with sidebar height */ 86 //jQuery('#containerDiv').css('min-height', jQuery('#menuDiv').height()+'px'); 87 //var ilo_sidebar = document.getElementById('menuDiv').clientHeight; 88 //document.getElementById("containerDiv").style.height = ilo_sidebar+"px"; 89 90 } ); 91})( jQuery ); 92 93 94/* 95function WriteFlash(a) { 96 document.write(a); 97}*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.