- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
878 B
JavaScript
Executable File
34 lines
878 B
JavaScript
Executable File
/* eslint-disable no-console */
|
|
/* eslint-disable camelcase */
|
|
import jQuery from 'jquery';
|
|
|
|
jQuery(function () {
|
|
const element = jQuery('.advanced-ads-adsense-dashboard');
|
|
const reportNeedRefresh = element.find('.report-need-refresh');
|
|
|
|
if (reportNeedRefresh.length) {
|
|
element.html(
|
|
'<p style="text-align:center;"><span class="report-need-refresh spinner advads-ad-parameters-spinner advads-spinner"></span></p>'
|
|
);
|
|
|
|
jQuery.ajax({
|
|
type: 'POST',
|
|
url: ajaxurl,
|
|
data: {
|
|
nonce: Advanced_Ads_Adsense_Report_Helper.nonce,
|
|
type: 'domain',
|
|
filter: '',
|
|
action: 'advads_adsense_report_refresh',
|
|
},
|
|
success(response) {
|
|
if (response.success && response.data && response.data.html) {
|
|
element.html(response.data.html);
|
|
}
|
|
},
|
|
error(request, status, error) {
|
|
console.log('Refreshing report error: ' + error);
|
|
},
|
|
});
|
|
}
|
|
});
|