1function spider_display_embed(embed_type,file_url,embed_id,attrs){var html_to_insert='';switch(embed_type){case'EMBED_OEMBED_YOUTUBE_VIDEO':var oembed_youtube_html='<iframe ';if(embed_id!=''){oembed_youtube_html+=' src="'+'//www.youtube.com/embed/'+embed_id+'?enablejsapi=1&wmode=transparent"';} 2for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_youtube_html+=' '+attr+'="'+attrs[attr]+'"';}}} 3oembed_youtube_html+=" ></iframe>";html_to_insert+=oembed_youtube_html;break;case'EMBED_OEMBED_VIMEO_VIDEO':var oembed_vimeo_html='<iframe ';if(embed_id!=''){oembed_vimeo_html+=' src="'+'//player.vimeo.com/video/'+embed_id+'?enablejsapi=1"';} 4for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_vimeo_html+=' '+attr+'="'+attrs[attr]+'"';}}} 5oembed_vimeo_html+=" ></iframe>";html_to_insert+=oembed_vimeo_html;break;case'EMBED_OEMBED_FLICKR_IMAGE':var oembed_flickr_html='<div ';for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_flickr_html+=' '+attr+'="'+attrs[attr]+'"';}}} 6oembed_flickr_html+=" >";if(embed_id!=''){oembed_flickr_html+='<img src="'+embed_id+'"'+' style="'+'max-width:'+'100%'+" !important"+'; max-height:'+'100%'+" !important"+'; width:'+'auto !important'+'; height:'+'auto !important'+';">';} 7oembed_flickr_html+="</div>";html_to_insert+=oembed_flickr_html;break;case'EMBED_OEMBED_FLICKR_VIDEO':break;case'EMBED_OEMBED_INSTAGRAM_VIDEO':var oembed_instagram_html='<div ';for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_instagram_html+=' '+attr+'="'+attrs[attr]+'"';}}} 8oembed_instagram_html+=" >";if(embed_id!=''){oembed_instagram_html+='<video style="width:auto !important; height:auto !important; max-width:100% !important; max-height:100% !important; margin:0 !important;" controls>'+'<source src="'+embed_id+'" type="video/mp4"> Your browser does not support the video tag. </video>';} 9oembed_instagram_html+="</div>";html_to_insert+=oembed_instagram_html;break;case'EMBED_OEMBED_INSTAGRAM_IMAGE':var oembed_instagram_html='<div ';for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_instagram_html+=' '+attr+'="'+attrs[attr]+'"';}}} 10oembed_instagram_html+=" >";if(embed_id!=''){oembed_instagram_html+='<img src="//instagram.com/p/'+embed_id+'/media/?size=l"'+' style=" '+'max-width:'+'100%'+" !important"+'; max-height:'+'100%'+" !important"+'; width:'+'auto'+'; height:'+'auto'+';">';} 11oembed_instagram_html+="</div>";html_to_insert+=oembed_instagram_html;break;case'EMBED_OEMBED_INSTAGRAM_POST':var oembed_instagram_html='<div ';var id='';for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_instagram_html+=' '+attr+'="'+attrs[attr]+'"';if(attr=='CLASS'||attr=='class'||attr=='Class'){obj_class=attrs[attr];}}}} 12oembed_instagram_html+=" >";if(embed_id!=''){oembed_instagram_html+='<iframe class="inner_instagram_iframe_'+obj_class+'" src="//instagr.am/p/'+embed_id+'/embed/?enablejsapi=1"'+' style="'+'max-width:'+'100%'+" !important"+'; max-height:'+'100%'+" !important"+'; width:'+'100%'+'; height:'+'100%'+'; margin:0'+'; display:table-cell; vertical-align:middle;"'+'frameborder="0" scrolling="no" allowtransparency="false" allowfullscreen'+'></iframe>';} 13oembed_instagram_html+="</div>";html_to_insert+=oembed_instagram_html;break;case'EMBED_OEMBED_FACEBOOK_IMAGE':var oembed_facebook_html='<span ';for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_facebook_html+=' '+attr+'="'+attrs[attr]+'"';}}} 14oembed_facebook_html+=" >";if(embed_id!=''){oembed_facebook_html+='<img src="'+file_url+'"'+' style=" '+'max-width:'+'100%'+" !important"+'; max-height:'+'100%'+" !important"+'; width:'+'auto'+'; height:'+'100%'+';">';} 15oembed_facebook_html+="</span>";html_to_insert+=oembed_facebook_html;break;case'EMBED_OEMBED_FACEBOOK_VIDEO':var oembed_facebook_video_html='<div ';for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_facebook_video_html+=' '+attr+'="'+attrs[attr]+'"';}}} 16oembed_facebook_video_html+=" >";if(embed_id!=''){oembed_facebook_video_html+='<iframe src="//www.facebook.com/video/embed?video_id='+file_url+'&enablejsapi=1&wmode=transparent"'+' style="'+'max-width:'+'100%'+" !important"+'; max-height:'+'100%'+" !important"+'; width:'+'100%'+'; height:'+'100%'+'; margin:0'+'; display:table-cell; vertical-align:middle;"'+'frameborder="0" class="bwg_fb_video" scrolling="no" allowtransparency="false" allowfullscreen'+'></iframe>';} 17oembed_facebook_video_html+="</div>";html_to_insert+=oembed_facebook_video_html;break;case'EMBED_OEMBED_DAILYMOTION_VIDEO':var oembed_dailymotion_html='<iframe ';if(embed_id!=''){oembed_dailymotion_html+=' src="'+'//www.dailymotion.com/embed/video/'+embed_id+'?api=postMessage"';} 18for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_dailymotion_html+=' '+attr+'="'+attrs[attr]+'"';}}} 19oembed_dailymotion_html+=" ></iframe>";html_to_insert+=oembed_dailymotion_html;break;case'EMBED_OEMBED_IMGUR':var oembed_imgur_html='<div ';for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_instagram_html+=' '+attr+'="'+attrs[attr]+'"';}}} 20oembed_imgur_html+=" >";if(embed_id!=''){oembed_imgur_html+='<img src="'+embed_id+'"'+' style="'+'max-width:'+'100%'+" !important"+'; max-height:'+'100%'+" !important"+'; width:'+'auto'+'; height:'+'auto'+" !important"+';">';} 21oembed_imgur_html+="</div>";html_to_insert+=oembed_imgur_html;break;case'EMBED_OEMBED_GOOGLE_PHOTO_IMAGE':var oembed_google_photos_html='<div ';for(attr in attrs){if(!(/src/i).test(attr)){if(attr!=''&&attrs[attr]!=''){oembed_google_photos_html+=' '+attr+'="'+attrs[attr]+'"';}}} 22oembed_google_photos_html+=" >";if(embed_id!=''){oembed_google_photos_html+='<img src="'+file_url+'"'+' style=" '+'max-width:'+'100%'+" !important"+'; max-height:'+'100%'+" !important"+'; width:'+'auto'+'; height:'+'auto'+';">';} 23oembed_google_photos_html+="</div>";html_to_insert+=oembed_google_photos_html;break;default:var html={content:''};jQuery(document).trigger('bwg_display_embed',[html,embed_type,file_url,embed_id,attrs]);html_to_insert=html.content;} 24return html_to_insert;} 25function bwg_add_instagram_gallery(instagram_access_token,from_popup){from_popup=typeof from_popup!=='undefined'?from_popup:false;if(from_popup===true){if(bwg_check_instagram_gallery_input(instagram_access_token,from_popup)){return false;} 26var whole_post='0';if(jQuery("input[name=popup_instagram_post_gallery]:checked").val()==1){whole_post='1';};var instagram_user=encodeURI(jQuery("#popup_instagram_gallery_source").val());var autogallery_image_number=encodeURI(jQuery("#popup_instagram_image_number").val());} 27else{if(bwg_check_instagram_gallery_input(instagram_access_token,from_popup)){return false;} 28if(!bwg_check_gallery_empty(false,true)){return false;} 29var whole_post='0';if(jQuery("input[name=instagram_post_gallery]:checked").val()==1){whole_post='1';} 30var instagram_user=encodeURI(jQuery("#gallery_source").val());var update_flag=jQuery("input[name=update_flag]:checked").val();var autogallery_image_number=encodeURI(jQuery("#autogallery_image_number").val());} 31jQuery('#bulk_embed').hide();jQuery('#loading_div').show();var filesValid=[];var data={'action':'addInstagramGallery','instagram_user':instagram_user,'instagram_access_token':instagram_access_token,'whole_post':whole_post,'autogallery_image_number':autogallery_image_number,'update_flag':update_flag,'async':true};jQuery.post(ajax_url,data,function(response){if(response==false){alert('Error: cannot get response from the server.');jQuery('#loading_div').hide();if(from_popup){jQuery('#bulk_embed').show();} 32return false;} 33else{var index_start=response.indexOf("WD_delimiter_start");var index_end=response.indexOf("WD_delimiter_end");if(index_start==-1||index_end==-1){jQuery('#loading_div').hide();if(from_popup){jQuery('#bulk_embed').show();} 34return false;} 35response=response.substring(index_start+18,index_end);response_JSON=jQuery.parseJSON(response);if(!response_JSON){alert('There is some error. Cannot add Instagram gallery.');jQuery('#loading_div').hide();if(from_popup){jQuery('#bulk_embed').show();} 36return false;} 37else{if(response_JSON[0]=='error'){alert('Error: '+jQuery.parseJSON(response)[1]);jQuery('#loading_div').hide();if(from_popup){jQuery('#bulk_embed').show();} 38return false;} 39else{var len=response_JSON.length;for(var i=1;i<=len;
39i++){if(response_JSON[len-i]!=false){var item=response_JSON[len-i];filesValid.push(item);}} 40bwg_add_image(filesValid);if(!from_popup){bwg_gallery_update_flag();jQuery('#tr_instagram_gallery_add_button').hide();} 41jQuery('#loading_div').hide();if(from_popup){jQuery('.opacity_bulk_embed').hide();} 42return"ok";}}}});}
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.