# top-10/4.4.3/includes/js/top-10.js

WebberZone Top 10 — Popular Posts, version 4.4.3. 32 lines.

- Page: https://pluginprobe.com/plugins/top-10/4.4.3/code/includes/js/top-10.js
- Raw: https://pluginprobe.com/plugins/top-10/4.4.3/raw/includes/js/top-10.js
- Modified: 2026-08-10T16:44:02+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/top-10/4.4.3/code/includes/js/top-10.js#L10-L20`.

```javascript
document.addEventListener('DOMContentLoaded', function () {
    var params = {
        action: 'tptn_tracker',
        top_ten_id: ajax_tptn_tracker.top_ten_id,
        top_ten_blog_id: ajax_tptn_tracker.top_ten_blog_id,
        activate_counter: ajax_tptn_tracker.activate_counter,
        top_ten_debug: ajax_tptn_tracker.top_ten_debug
    };

    fetch(ajax_tptn_tracker.ajax_url, {
        method: 'POST',
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
            'Cache-Control': 'no-cache'
        },
        body: new URLSearchParams(params).toString()
    })
        .then(function (response) {
            if (!response.ok && 204 !== response.status) {
                throw new Error('Tracker request failed');
            }

            return response.text();
        })
        .then(function (data) {
            // handle the response data
        })
        .catch(function (error) {
            console.error('Error:', error);
        });
});

```
