# hostinger/3.0.76/src/js/global-scripts.js

Hostinger Tools, version 3.0.76. 41 lines.

- Page: https://pluginprobe.com/plugins/hostinger/3.0.76/code/src/js/global-scripts.js
- Raw: https://pluginprobe.com/plugins/hostinger/3.0.76/raw/src/js/global-scripts.js
- Modified: 2025-03-03T08:32:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/hostinger/3.0.76/code/src/js/global-scripts.js#L10-L20`.

```javascript
document.addEventListener('DOMContentLoaded', function() {

    const pluginSplitClose = document.getElementById('plugin-split-close');

    if(pluginSplitClose) {
        pluginSplitClose.addEventListener('click', function () {
            let nonceElement = document.getElementById('hts_close_plugin_split_nonce');

            if (!nonceElement) {
                console.error('Nonce element not found.');
                return;
            }

            let nonce = nonceElement.value;

            fetch(ajaxurl, {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/x-www-form-urlencoded',
                },
                body: new URLSearchParams({
                    'action': 'hostinger_dismiss_plugin_split_notice',
                    'nonce': nonce
                }),
            })
                .then(response => {
                    if (!response.ok) {
                        throw new Error('Network response was not ok ' + response.statusText);
                    }
                    return response.json();
                })
                .then(data => {
                    document.getElementById('hostinger-plugin-split-notice').style.display = 'none';
                })
                .catch(error => {
                    console.error('Error:', error);
                });
        });
    }
});

```
