PageSourceSearch

https://www.medya24.com/frontend/diamond/assets/js/helpers.js?v=1791417336

js medya24.com collected 2026-10-07 23:55:51 UTC 1,928 bytes, 53 lines download raw bytes

1window.__ = function(key, replacements = {}) {
2    let translation = key.split('.').reduce((obj, i) => obj?.[i], Habersoft.translations);
3    
4    if (!translation) {
5        console.warn(`Translation missing for key: ${key}`);
6        return key;
7    }
8
9    Object.entries(replacements).forEach(([key, value]) => {
10        translation = translation.replace(`:${key}`, value);
11    });
12
13    return translation;
14};
15
16window.throttle = function(func, limit) {
17    let inThrottle;
18    return function() {
19        const args = arguments;
20        const context = this;
21        if (!inThrottle) {
22            func.apply(context, args);
23            inThrottle = true;
24            setTimeout(() => inThrottle = false, limit);
25        }
26    };
27};
28
29window.showToast = function(type, message) {
30    let toastContainer = $('.toast-container');
31    if (toastContainer.length === 0) {
32        toastContainer = $('<div class="toast-container position-fixed bottom-0 end-0 p-3" style="z-index: 1055;"></div>');
33        $('body').append(toastContainer);
34    } else {
35        toastContainer.empty();
36    }
37    if(type==='clear'){
38        return;
39    }
40    let toastHtml = '<div class="toast align-items-center text-bg-' + type + ' border-0 show" role="alert" aria-live="assertive" aria-atomic="true" data-bs-autohide="true" data-bs-delay="1000">' +
41                        '<div class="d-flex">' +
42                            '<div class="toast-body">' + message + '</div>' +
43                            '<button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button>' +
44                        '</div>' +
45                    '</div>';
46    let $toast = $(toastHtml);
47    toastContainer.append($toast);
48    let bsToast = new bootstrap.Toast($toast[0]);
49    bsToast.show();
50    $toast.on('hidden.bs.toast', function() {
51        $(this).remove();
52    });
53};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.