PluginProbe
Hostinger Tools / 2.2.2
Hostinger Tools v2.2.2
3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 2.0.4 All 108 releases
← All changes | src/js/global-scripts.js +10 -36 3.0.742.2.2 View file →
@@ -1,40 +1,14 @@
1 -document.addEventListener('DOMContentLoaded', function() {
1 +import './autocomplete_steps'
2 2
3 - const pluginSplitClose = document.getElementById('plugin-split-close');
3 +(function ($) {
4 4
5 - if(pluginSplitClose) {
6 - pluginSplitClose.addEventListener('click', function () {
7 - let nonceElement = document.getElementById('hts_close_plugin_split_nonce');
5 + $(document).on('ready', function () {
6 + const nonce = $('#hts_close_omnisend_nonce').val();
7 + $('.hts-omnisend .notice-dismiss').on('click', function() {
8 + $.post(ajaxurl, { action: 'hostinger_dismiss_omnisend_notice', nonce: nonce });
9 + $('.hts-omnisend').remove();
10 + });
8 11
9 - if (!nonceElement) {
10 - console.error('Nonce element not found.');
11 - return;
12 - }
12 + });
13 13
14 - let nonce = nonceElement.value;
15 -
16 - fetch(ajaxurl, {
17 - method: 'POST',
18 - headers: {
19 - 'Content-Type': 'application/x-www-form-urlencoded',
20 - },
21 - body: new URLSearchParams({
22 - 'action': 'hostinger_dismiss_plugin_split_notice',
23 - 'nonce': nonce
24 - }),
25 - })
26 - .then(response => {
27 - if (!response.ok) {
28 - throw new Error('Network response was not ok ' + response.statusText);
29 - }
30 - return response.json();
31 - })
32 - .then(data => {
33 - document.getElementById('hostinger-plugin-split-notice').style.display = 'none';
34 - })
35 - .catch(error => {
36 - console.error('Error:', error);
37 - });
38 - });
39 - }
40 -});
14 +})(jQuery);