PageSourceSearch

https://mcsonj.org/wp-content/cache/wpo-minify/1790276500/assets/w…alogwp-i18nwppa-ajax-front1790156345.min.js

js mcsonj.org collected 2026-09-25 05:12:40 UTC 30,604 bytes, 94 lines download raw bytes

1
2var wppaJsAjaxVersion='9.3.01.002';function wppaDoAjaxRender(event,mocc,ajaxurl,newurl,addHilite){event.stopPropagation();if(wppaLang!='')ajaxurl+='&lang='+wppaLang;if(wppaAutoColumnWidth[mocc])ajaxurl+='&resp=1';ajaxurl+='&wppa-cw='+wppaGetContainerWidth(mocc);if(addHilite&&_wppaCurIdx[mocc]&&_wppaId[mocc][_wppaCurIdx[mocc]])ajaxurl+='&wppa-hilite='+_wppaId[mocc][_wppaCurIdx[mocc]];if(wppaCanAjaxRender||!newurl){jQuery.ajax({url:ajaxurl,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}
3if(_wppaSSRuns[mocc])_wppaStop(mocc);jQuery('#wppa-ajax-spin-'+mocc).fadeIn()},success:function(xresult,status,xhr){if(typeof(xresult)=='string'&&xresult.substr(0,1)!='{'){if(xresult.substr(0,9)=='<!DOCTYPE'||xresult.substr(0,5)=='<html'){if(newurl.length>0){document.location.href=newurl}else{alert(__('Frontend Ajax request failed. Try a different setting in Advanced settings -> System -> I -> Item 5','wp-photo-album-plus'))}}else{alert(__('Unexpected output','wp-photo-album-plus')+': '+xresult.substr(0,100)+'...')}}else{if(typeof(xresult)=='string'){var theResult=JSON.parse(xresult);var result=theResult.html+'<script>'+theResult.js+'</script>'}else{var result=xresult.html+'<script>'+xresult.js+'</script>'}
4if(wppaRenderModal&&newurl){var opt={modal:!0,resizable:!0,width:wppaGetContainerWidth(mocc),show:{effect:"fadeIn",duration:400},closeText:"",classes:"wppa-dialog",};wppaPrepareModal(mocc);jQuery('#wppa-modal-container-'+mocc).html(result);jQuery('#wppa-modal-container-'+mocc).dialog(opt);var isSlide=result.indexOf('slide-frame')!=-1;var theTop;if(isSlide){if(wppaAreaMaxFracSlide==1){theTop=wppaWindowHeight()/20}else{theTop=((wppaWindowHeight()-wppaWindowHeight()*wppaAreaMaxFracSlide)/2)}}else{if(wppaAreaMaxFrac==1){theTop=wppaWindowHeight()/20}else{theTop=((wppaWindowHeight()-wppaWindowHeight()*wppaAreaMaxFrac)/2)}}
5jQuery('.ui-dialog').css({boxShadow:'0px 0px 5px 5px #aaaaaa',borderRadius:wppaBoxRadius+'px',padding:'8px',backgroundColor:wppaModalBgColor,boxSizing:'content-box',zIndex:100000,margin:'auto',overflow:'hidden',position:'fixed',left:((wppaWindowWidth()-wppaGetContainerWidth(mocc))/2)+'px',top:theTop+'px',});jQuery('.ui-dialog-titlebar').css({lineHeight:'0px',height:'32px',});jQuery('.ui-button').css({backgroundImage:wppaModalQuitImg,padding:0,position:'absolute',right:'8px',top:'8px',width:'16px',height:'16px',});jQuery('.ui-button').attr('title','Close');jQuery('.ui-button').on('click',function(){_wppaStop(mocc)});jQuery('.wppa-ajax-spin').stop().fadeOut();setTimeout(function(){if(jQuery().niceScroll){jQuery(".wppa-albumlist-"+mocc).niceScroll(".wppa-nicewrap",{});jQuery(".wppa-slidelist-"+mocc).niceScroll(".wppa-nicewrap",{})}},1000);jQuery(document).trigger('resize')}else{jQuery('#wppa-container-'+mocc).html(result);jQuery('#wppa-button-hide-'+mocc).show()}
6if(wppaCanPushState&&wppaUpdateAddressLine&&newurl){newurl=newurl.split('&amp;').join('&');history.pushState({type:'ajax'},"",newurl)}
7wppaUpdateLightboxes();if(typeof(wppaQRUpdate)!='undefined'){wppaQRUpdate(newurl)}
7
8wppaColWidth[mocc]=0;_wppaDoAutocol(mocc,'ajax')}},error:function(xhr,status,error){wppaConsoleLog('wppaDoAjaxRender failed. Error = '+error+', status = '+status);if(newurl){document.location.href=newurl}else{document.location.reload(!0)}},complete:function(xhr,status,newurl){if(!wppaRenderModal&&wppaAjaxScroll){jQuery('html, body').animate({scrollTop:jQuery("#wppa-container-"+mocc).offset().top-32-wppaStickyHeaderHeight},1000)}
9jQuery('.wppa-ajax-spin').stop().fadeOut();window.dispatchEvent(new Event('resize'));wppaProtect();wppaDoInit()}})}else{document.location.href=newurl;wppaColWidth[mocc]=0;_wppaDoAutocol(mocc,'nonajax')}}
10function wppaDoFetchShortcodeRendered(mocc,shortcode,page){jQuery.ajax({url:wppaAjaxUrl+'?action=wppa&wppa-action=getshortcodedrenderedfenodelay&wppa-shortcode='+shortcode+'&wppa-nonce='+jQuery('#wppa-nonce').val()+'&wppa-occur='+mocc+'&wppa-fromp='+page,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}
11jQuery('#wppa-ajax-spin-'+mocc).show()},success:function(xresult,status,xhr){var theResult;var result;try{if(wppaAjaxMethod=='rest'){result=xresult.html+'<script>'+xresult.js+'</script>'}else{theResult=JSON.parse(xresult);result=theResult.html+'<script>'+theResult.js+'</script>'}
12jQuery('#wppa-container-'+mocc).html(result)}catch(e){wppaConsoleLog('wppaDoFetchShortcodeRendered failed. Invalid json data')}},error:function(xhr,status,error){wppaConsoleLog('wppaDoFetchShortcodeRendered failed. Error = '+error+', status = '+status)},complete:function(xhr,status){jQuery(document).trigger('resize');wppaProtect();jQuery('#wppa-ajax-spin-'+mocc).hide();wppaInitOverlay()}})}
13function wppaAjaxApprovePhoto(photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=approve'+'&photo-id='+photo,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
14if(result=='OK'){jQuery('.wppa-approve-'+photo).css('display','none')}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApprovePhoto failed. Error = '+error+', status = '+status)},})}
15function wppaAjaxRemovePhoto(mocc,photo,isslide){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&photo-id='+photo,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
16rtxt=result.split('||');if(rtxt[0]=='OK'){if(isslide){jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('src','');jQuery('#wppa-film-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');jQuery('#wppa-pre-'+_wppaCurIdx[mocc]+'-'+mocc).attr('alt','removed');wppaNext(mocc)}else{jQuery('.wppa-approve-'+photo).css('display','none');jQuery('.thumbnail-frame-photo-'+photo).css('display','none')}}else{if(rtxt[3]){alert(rtxt[3]);jQuery('#wppa-delete-'+photo).css('text-decoration','line-through')}else{alert(result)}}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxRemovePhoto failed. Error = '+error+', status = '+status)}})}
17function wppaAjaxApproveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=approve'+'&comment-id='+comment,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
18if(result=='OK'){jQuery('.wppa-approve-'+comment).css('display','none')}else{alert(result)}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxApproveComment failed. Error = '+error+', status = '+status)}})}
19function wppaAjaxRemoveComment(comment){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=remove'+'&comment-id='+comment,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
20var rtxt=result.split('||');
20if(rtxt[0]=='OK'){jQuery('.wppa-approve-'+comment).css('display','none');jQuery('.wppa-comment-'+comment).css('display','none')}else{alert(result)}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxRemoveComment failed. Error = '+error+', status = '+status)},})}
21function wppaAjaxAddPhotoToZip(mocc,id,reload){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=addtozip'+'&photo-id='+id,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
22var rtxt=result.split('||');if(rtxt[0]=='OK'){jQuery('#admin-choice-'+id+'-'+mocc).html(rtxt[2]);jQuery('#admin-choice-'+id+'-'+mocc).val(rtxt[2]);jQuery('#admin-choice-'+id+'-'+mocc).prop('disabled',!0)}
23alert(rtxt[1]);if(reload){document.location.reload(!0)}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxAddPhotoToZip failed. Error = '+error+', status = '+status)},})}
24function wppaAjaxRemovePhotoFromZip(mocc,id,reload){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=removefromzip'+'&photo-id='+id,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
25var rtxt=result.split('||');if(rtxt[0]=='OK'){jQuery('#admin-choice-rem-'+id+'-'+mocc).val(rtxt[1]);jQuery('#admin-choice-rem-'+id+'-'+mocc).prop('disabled',!0);jQuery('#admin-choice-rem-'+id+'-'+mocc).css('text-decoration','')}else{alert(result)}
26if(reload){document.location.reload(!0)}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxRemovePhotoFromZip failed. Error = '+error+', status = '+status,'force')},})}
27function wppaAjaxDeleteMyZip(nonce,login){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=delmyzip'+'&wppa-nonce='+nonce,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
28jQuery('#'+login).html(result)},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxDeleteMyZip failed. Error = '+error+', status = '+status)},})}
29function wppaAjaxRequestInfo(mocc,id,reload){dialogHtml='<div class="wppa-modal">'+'<h3>'+__('Please specify your question','wp-photo-album-plus')+'</h3>'+'<textarea id="wppa-request-info-text-'+mocc+'" style="width:98%;" ></textarea>'+'<div style="clear:both;" ></div>'+'<input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="'+__('Send','wp-photo-album-plus')+'" onclick="wppaAjaxRequestInfoSend( '+mocc+', \''+id+'\', '+reload+' )" />'+'<input type="button" style="float:left;margin-top:8px;margin-right:8px;" value="'+__('Cancel','wp-photo-album-plus')+'" onclick="jQuery( \'#wppa-modal-container-'+mocc+'\' ).dialog( \'close\' );" />'+'<div style="clear:both;" ></div></div>';var opt={modal:!0,resizable:!0,width:wppaGetContainerWidth(mocc),show:{effect:"fadeIn",duration:400},closeText:"",classes:"wppa-dialog",};wppaPrepareModal(mocc);jQuery('#wppa-modal-container-'+mocc).html(dialogHtml);jQuery('#wppa-modal-container-'+mocc).dialog(opt);jQuery('.ui-dialog').css({boxShadow:'0px 0px 5px 5px #aaaaaa',borderRadius:wppaBoxRadius+'px',padding:'8px',backgroundColor:wppaModalBgColor,boxSizing:'content-box',zIndex:100000,position:'fixed',top:(wppaWindowHeight()/10)+'px',});jQuery('.ui-dialog-titlebar').css({lineHeight:'0px',height:'24px',})
30jQuery('.ui-button').css({backgroundImage:wppaModalQuitImg,padding:0,position:'absolute',right:'8px',top:'8px',width:'16px',height:'16px',});jQuery('.ui-button').attr('title','Close');jQuery(document).trigger('resize')}
31function wppaAjaxRequestInfoSend(mocc,id,reload){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=requestinfo'+'&photo-id='+id+'&emailtext='+jQuery('#wppa-request-info-text-'+mocc).val(),async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
32var rtxt=result.split('||');
32if(rtxt[0]=='OK'){jQuery('#request-info-'+id+'-'+mocc).val(rtxt[1]);jQuery('#request-info-'+id+'-'+mocc).prop('disabled',!0)}else{alert(result)}
33if(reload){document.location.reload(!0)}else{jQuery('#wppa-modal-container-'+mocc).dialog('close');jQuery('#wppa-modal-container-'+mocc).html('')}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxRequestInfoSend failed. Error = '+error+', status = '+status)},})}
34function wppaEditPhoto(mocc,id){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=front-edit'+'&photo-id='+id+'&occur='+mocc,async:!0,type:'POST',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
35var opt={modal:!0,resizable:!0,width:wppaGetContainerWidth(mocc),show:{effect:"fadeIn",duration:400},closeText:"",classes:"wppa-dialog",};wppaPrepareModal(mocc);jQuery('#wppa-modal-container-'+mocc).html(result);jQuery('#wppa-modal-container-'+mocc).dialog(opt);jQuery('.ui-dialog').css({boxShadow:'0px 0px 5px 5px #aaaaaa',borderRadius:wppaBoxRadius+'px',padding:'8px',backgroundColor:wppaModalBgColor,boxSizing:'content-box',zIndex:100000,position:'fixed',top:(wppaWindowHeight()/10)+'px',});jQuery('.ui-dialog-titlebar').css({lineHeight:'0px',height:'24px',})
36jQuery('.ui-button').css({backgroundImage:wppaModalQuitImg,padding:0,position:'absolute',right:'8px',top:'8px',width:'16px',height:'16px',});jQuery('.ui-button').attr('title','Close');jQuery(document).trigger('resize');jQuery('.ui-dialog').on('scroll wheel',function(event){event.stopPropagation()})},error:function(xhr,status,error){wppaConsoleLog('wppaEditPhoto failed. Error = '+error+', status = '+status)},complete:function(xhr,status,newurl){}})}
37function wppaPrevTags(tagsSel1,tagsSel2,tagsSel3,tagsEdit,tagsAlbum,tagsPrev,tagsNewval,buttonId,waitText){var sel1=jQuery('#'+tagsSel1).val()||'';var sel2=jQuery('#'+tagsSel2).val()||'';var sel3=jQuery('#'+tagsSel3).val()||'';var edit=jQuery('#'+tagsEdit).val()||'';var album=jQuery('#'+tagsAlbum).val()||'';var i=0;var j=0;var tags='';var buttonText=jQuery('#'+buttonId).val()||'';jQuery('#'+buttonId).val(waitText);jQuery('#'+buttonId).attr('disabled','disabled');var data='action=wppa&wppa-action=sanitizetags&tags='+sel1+','+sel2+','+sel3+','+edit+'&album='+album;jQuery.ajax({url:wppaAjaxUrl,data:data,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}
38jQuery('#'+tagsPrev).html('Working...')},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
39jQuery('#'+tagsNewval).attr('value',wppaTrim(result,','));jQuery('#'+tagsPrev).html(wppaTrim(result,','));jQuery('#'+buttonId).val(buttonText);jQuery('#'+buttonId).removeAttr('disabled')},error:function(xhr,status,error){jQuery('#'+tagsPrev).html('<span style="color:red" >'+error+'</span>');wppaConsoleLog('wppaPrevTags failed. Error = '+error+', status = '+status)},})}
40function wppaAjaxDestroyAlbum(album,nonce){if(confirm('Are you sure you want to delete this album?')){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=destroyalbum'+'&album='+album+'&nonce='+nonce,async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
41alert(result+'\n'+__('Page will be reloaded','wp-photo-album-plus'));document.location.reload(!0)},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxDestroyAlbum failed. Error = '+error+', status = '+status)},})}
42return!1}
43function _bumpClickCount(photo){if(!wppaBumpClickCount)return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=bumpclickcount'+'&wppa-photo='+photo+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:!1,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}},error:function(xhr,status,error){wppaConsoleLog('_bumpClickCount failed. Error = '+error+', status = '+status)},})}
44function _bumpViewCount(photo){if(!wppaBumpViewCount)return;if(wppaPhotoView[photo]){return}
45if(photo==0){return}
46jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=bumpviewcount'+'&wppa-photo='+photo+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
47wppaPhotoView[photo]=!0},error:function(xhr,status,error){wppaConsoleLog('_bumpViewCount failed. Error = '+error+', status = '+status)},})}
48function wppaVoteThumb(mocc,photo){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating=1'+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-index=0'+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
49jQuery('#wppa-vote-button-'+mocc+'-'+photo).val(wppaVotedForMe)},error:function(xhr,status,error){wppaConsoleLog('wppaVoteThumb failed. Error = '+error+', status = '+status)},})}
50function _wppaRateIt(mocc,value){if(value==0)return;if(_wppaSSRuns[mocc])return;var photo=_wppaId[mocc][_wppaCurIdx[mocc]];var oldval=_wppaMyr[mocc][_wppaCurIdx[mocc]];var waittext=_wppaWaitTexts[mocc][_wppaCurIdx[mocc]];if(waittext.length>0){alert(waittext);return}
51if(oldval!=0&&wppaRatingOnce){return}
52if(oldval<0)return;_wppaVoteInProgress=!0;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating='+value+'&wppa-rating-id='+photo+'&wppa-occur='+mocc+'&wppa-index='+_wppaCurIdx[mocc]+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}
53jQuery('#wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'tick.png');jQuery('#wppa-rate-'+mocc+'-'+value).stop().fadeTo(100,1.0);jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'spinner.gif')},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
54var ArrValues=result.split("||");if(ArrValues[0]==0){if(ArrValues[1]==900){alert(ArrValues[2]);_wppaSetRatingDisplay(mocc)}else{alert(__('Error Code','wp-photo-album-plus')+' = '+ArrValues[1]+'\n\n'+ArrValues[2])}}else{if(ArrValues[7]&&ArrValues[7]=='likes'){var likeText=ArrValues[4].split("|");jQuery('#wppa-like-'+mocc).attr('title',likeText[0]);jQuery('#wppa-liketext-'+mocc).html(likeText[1]);if(ArrValues[3]=='1'){jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbdown.png')}else{jQuery('#wppa-like-'+mocc).attr('src',wppaImageDirectory+'thumbup.png')}
55_wppaMyr[ArrValues[0]][ArrValues[2]]=ArrValues[3];_wppaAvg[ArrValues[0]][ArrValues[2]]=ArrValues[4]}else{_wppaMyr[ArrValues[0]][ArrValues[2]]=ArrValues[3];_wppaAvg[ArrValues[0]][ArrValues[2]]=ArrValues[4];_wppaDisc[ArrValues[0]][ArrValues[2]]=ArrValues[5];_wppaSetRatingDisplay(mocc);if(wppaCommentRequiredAfterVote){if(ArrValues[6]==0){alert(ArrValues[7])}}}
56if(wppaNextOnCallback)_wppaNextOnCallback(mocc);}},error:function(xhr,status,error){wppaConsoleLog('_wppaRateIt failed. Error = '+error+', status = '+status)},})}
57function _wppaOvlRateIt(id,value,mocc,reloadAfter){if(value==0)return;jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=rate'+'&wppa-rating='+value+'&wppa-rating-id='+id+'&wppa-occur=1'+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}
58jQuery('.wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'tick.png');jQuery('.wppa-rate-'+mocc+'-'+value).stop().fadeTo(100,1.0);jQuery('#wppa-like-'+id+'-'+mocc).attr('src',wppaImageDirectory+'spinner.gif');jQuery('#wppa-like-0').attr('src',wppaImageDirectory+'spinner.gif')},success:function(xresult,status,xhr){var result;if(xresult.txt){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
59var ArrValues=result.split("||");if(ArrValues[0]==0){if(ArrValues[1]==900){alert(ArrValues[2])}else{alert(__('Error Code','wp-photo-album-plus')+' = '+ArrValues[1]+'\n\n'+ArrValues[2])}
60jQuery('.wppa-rate-'+mocc+'-'+value).attr('src',wppaImageDirectory+'cross.png')}else{if(ArrValues[7]&&ArrValues[7]=='likes'){var likeText=ArrValues[4].split("|");jQuery('#wppa-like-0').attr('title',likeText[0]);jQuery('#wppa-liketext-0').html(likeText[1]);if(ArrValues[3]=='1'){jQuery('#wppa-like-0').attr('src',wppaImageDirectory+'thumbdown.png')}else{jQuery('#wppa-like-0').attr('src',wppaImageDirectory+'thumbup.png')}
61jQuery('#wppa-like-'+id+'-'+mocc).attr('title',likeText[0]);jQuery('#wppa-liketext-'+id+'-'+mocc).html(likeText[1]);if(ArrValues[3]=='1'){jQuery('#wppa-like-'+id+'-'+mocc).attr('src',wppaImageDirectory+'thumbdown.png')}else{jQuery('#wppa-like-'+id+'-'+mocc).attr('src',wppaImageDirectory+'thumbup.png')}
62return}
63_wppaSetRd(mocc,ArrValues[4],'.wppa-avg-');_wppaSetRd(mocc,ArrValues[3],'.wppa-rate-');if(reloadAfter){return}
64if(wppaNextOnCallback)wppaOvlShowNext();}},error:function(xhr,status,error){wppaConsoleLog('_wppaOvlRateIt failed. Error = '+error+', status = '+status)},})}
65function wppaAjaxDownloadAlbum(mocc,id){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=downloadalbum'+'&album-id='+id,async:!0,type:'GET',timeout:120000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}
66jQuery('#dwnspin-'+mocc+'-'+id).css('display','')},success:function(xresult,status,xhr){var result;if(xresult.txt){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
67var ArrValues=result.split("||");var url=ArrValues[0];var erok=ArrValues[1];var text=ArrValues[2];if(ArrValues.length==3&&text!=''){alert(__('Attention','wp-photo-album-plus')+':\n\n'+text)}
68if(erok=='OK'){document.location=url}else{alert(__('The server could not complete the request. Please try again.','wp-photo-album-plus'))}},error:function(xhr,status,error){alert('An error occurred:\n'+error+'\nPlease try again')},complete:function(xhr,status,newurl){jQuery('#dwnspin-'+mocc+'-'+id).css('display','none')}})}
69function wppaAjaxComment(mocc,id){if(!_wppaValidateComment(mocc,id))return;var theComment=jQuery("#wppa-comment-"+mocc).val();theComment=theComment.replace(/&/g,'%26');theComment=theComment.replace(/</g,'\\<');theComment=theComment.replace(/>/g,'\\>');var data={photoid:id,comname:jQuery("#wppa-comname-"+mocc).val(),comment:theComment,captcha:jQuery("#wppa-captcha-"+mocc).val(),nonce:jQuery("#wppa-nonce").val(),occur:mocc,comemail:jQuery("#wppa-comemail-"+mocc).val(),comid:jQuery("#wppa-comment-edit-"+mocc).val(),returnurl:encodeURIComponent(jQuery("#wppa-returnurl-"+mocc).val()),dbagree:jQuery("#db-agree-"+mocc).prop('checked')?'yes':'no'};var theData=JSON.stringify(data);jQuery.ajax({url:wppaAjaxUrl+'?action=wppa&wppa-action=do-comment',data:'data='+theData,async:!0,type:'POST',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}
70jQuery("#wppa-comment-spin-"+mocc).css('display','inline')},success:function(xresult,status,xhr){var result;if(xresult.txt){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
71if(result){result=result.replace(/\\/g,'');jQuery("#wppa-comments-"+mocc).html(result);if(_wppaCurIdx[mocc]){_wppaCommentHtml[mocc][_wppaCurIdx[mocc]]=result}}
72wppaOpenComments(mocc)},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxComment failed. Error = '+error+', status = '+status)},complete:function(xhr,status,newurl){jQuery("#wppa-comment-spin-"+mocc).css('display','none')}})}
73function wppaUpdatePhotoNew(id,mocc){var myItems=['upn-album','upn-name','upn-description','upn-tags','custom_0','custom_1','custom_2','custom_3','custom_4','custom_5','custom_6','custom_7','custom_8','custom_9',];var myData='action=wppa'+'&wppa-action=update-photo-new'+'&photo-id='+id+'&wppa-nonce='+jQuery('#wppa-nonce-'+id).val();var i=0;var tMceContent='';while(i<myItems.length){if(typeof(jQuery('#'+myItems[i]).val())!='undefined'){myData+='&'+myItems[i]+'='+jQuery('#'+myItems[i]).val()}
74tMceContent=wppaGetTinyMceContent(myItems[i]);if(typeof(tMceContent)!='undefined'){myData+='&'+myItems[i]+'='+tMceContent}
75i++}
76if(jQuery('#upn-reload').prop('checked')){myData+='&upn-reload=on'}
77myData.replaceAll("'","%047");jQuery.ajax({url:wppaAjaxUrl,data:myData,async:!0,type:'POST',timeout:10000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(typeof(xresult)=='object'){result=xresult}else{result=JSON.parse(xresult)}
78if(result.error){wppaConsoleLog('Failed to report updates','force');alert(result.error)}else{if(typeof(result.description)!='undefined')jQuery('.sdd-'+mocc).html(result.description);if(typeof(result.name)!='undefined')jQuery('.sdn-'+mocc).html(result.name);if(typeof(result.fullname)!='undefined')jQuery('.sdf-'+mocc).html(result.fullname);if(_wppaNames[mocc]){if(typeof(result.name)!='undefined')_wppaNames[mocc][_wppaCurIdx[mocc]]=wppaFixHtml(result.name);if(typeof(result.fullname)!='undefined')_wppaFullNames[mocc][_wppaCurIdx[mocc]]=wppaFixHtml(result.fullname);if(typeof(result.description)!='undefined')_wppaDsc[mocc][_wppaCurIdx[mocc]]=wppaFixHtml(result.description);jQuery("#imagetitle-"+mocc).html(wppaMakeNameHtml(mocc))}}},error:function(xhr,status,error){wppaConsoleLog('wppaUpdatePhotoNew failed. Error = '+error+', status = '+status)},complete:function(xhr,status,newurl){if(jQuery('#upn-reload').prop('checked')){document.location.reload(!0)}else{jQuery('#wppa-modal-container-'+mocc).dialog('close');
78jQuery('#wppa-modal-container-'+mocc).html('')}}})}
79function wppaFixHtml(txt){if(!txt)return'';txt=txt.replace(/\[/g,'<');txt=txt.replace(/\]/g,'>');txt=txt.replace(/&quot;/g,'"');txt=txt.replace(/\\n/g,' ');return txt}
80var wppaLastQrcodeUrl='';function wppaAjaxSetQrCodeSrc(url,elm){if(jQuery(elm).length==0){return}
81if(wppaLastQrcodeUrl==url){return}
82wppaLastQrcodeUrl=url;var myData='action=wppa'+'&wppa-action=getqrcode'+'&wppa-qr-nonce='+jQuery('#wppa-qr-nonce').val()+'&url='+encodeURIComponent(url);jQuery.ajax({url:wppaAjaxUrl,data:myData,async:!0,type:'POST',timeout:10000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
83var temp=result.split('|');jQuery(elm).attr('src',temp[0]);jQuery(elm).attr('title',temp[1])},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxSetQrCodeSrc failed. Error = '+error+', status = '+status)}})}
84function wppaAjaxNotify(elm,list,user){var onoff=jQuery(elm).prop('checked')?'on':'off';var myData='action=wppa'+'&wppa-action=mailinglist'+'&wppa-ntfy-nonce='+jQuery('#wppa-ntfy-nonce').val()+'&list='+list+'&onoff='+onoff;if(user){myData+='&wppa-user='+user}
85jQuery.ajax({url:wppaAdminAjaxUrl,data:myData,async:!0,type:'POST',timeout:10000,beforeSend:function(xhr){if(user){jQuery("#img_"+list+"-"+user).attr('src',wppaImageDirectory+'spinner.gif')}},success:function(result,status,xhr){if(user){jQuery("#img_"+list+"-"+user).attr('src',wppaImageDirectory+'tick.png')}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxNotify failed. Error = '+error+', status = '+status);jQuery("#img_"+list+"-"+user).attr('src',wppaImageDirectory+'cross.png')}})}
86function wppaAjaxGetSsIptcList(mocc,s3,selid,retry){wppaAjaxGetSsIptcExifList(mocc,s3,selid,retry,'iptc')}
87function wppaAjaxGetSsExifList(mocc,s3,selid,retry){wppaAjaxGetSsIptcExifList(mocc,s3,selid,retry,'exif')}
88function wppaAjaxGetSsIptcExifList(mocc,s3,selid,retry,tagtype){ajaxurl=wppaAjaxUrl;ajaxurl+='?action=wppa&wppa-action=getss'+tagtype+'list&'+tagtype+'tag='+s3+'&occur='+mocc;jQuery.ajax({url:ajaxurl,async:!0,type:'GET',timeout:10000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}
89jQuery('#wppa-ss-spinner-'+mocc).css('display','')},success:function(xresult,status,xhr){var result;if(wppaAjaxMethod=='rest'){result=xresult.txt}else{theResult=JSON.parse(xresult);result=theResult.txt}
90jQuery('#'+selid).html(result);jQuery('#wppa-ss-'+tagtype+'opts-'+mocc).css('display','');wppaSuperSearchSelect(mocc);setTimeout('wppaSetIptcExifSize( ".wppa-'+tagtype+'list-'+mocc+'", "#'+selid+'" )',10);if(retry){wppaConsoleLog('wppaAjaxGetSs'+tagtype+'List success after retry.')}},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxGetSs'+tagtype+'List failed. Error = '+error+', status = '+status);if(!retry)wppaAjaxGetSsIptcExifList(mocc,s3,selid,!0,tagtype);},complete:function(xhr,status,newurl){jQuery('#wppa-ss-spinner-'+mocc).css('display','none')}})}
91function wppaPrepareModal(mocc){try{jQuery('#wppa-modal-container-'+mocc).dialog('destroy');jQuery('#wppa-modal-container-'+mocc).html('')}catch(e){jQuery('#wppa-modal-container-'+mocc).html('')}}
92function wppaAjaxBumpDownloadCount(id){jQuery.ajax({url:wppaAjaxUrl,data:'action=wppa'+'&wppa-action=bumpdownloadcount'+'&wppa-photo='+id+'&wppa-nonce='+jQuery('#wppa-nonce').val(),async:!0,type:'GET',timeout:60000,beforeSend:function(xhr){if(wppaAjaxMethod=='rest'){xhr.setRequestHeader('X-WP-NONCE',wppaObj.restNonce)}},success:function(result,status,xhr){},error:function(xhr,status,error){wppaConsoleLog('wppaAjaxBumpDownloadCount. Error = '+error+', status = '+status)},})};
93
94

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.