PageSourceSearch

https://www.nursingtimes.net/wp-content/mu-plugins/mbm-emap/assets/js/lazy-load/lazy-load.js?ver=1.1

js nursingtimes.net collected 2026-09-24 15:23:46 UTC 2,606 bytes, 76 lines download raw bytes

1jQuery(document).ready(function () {
2
3    // Expose jQuery to the global object
4    window.jQuery = window.$ = jQuery;
5
6    if ($(".view-more a.dynamic-loader").length) {
7        lazy_exclude = atob($(".view-more a.dynamic-loader").attr('data-exclude'));
8        page_exclude = [];
9
10        $(document).find("[data-mbm-norepeat]").each(function () {
11            page_exclude.push($(this).attr("data-mbm-norepeat"));
12        });
13        page_exclude.join(",");
14
15        all_excludes = lazy_exclude + "," + page_exclude;
16        all_excludes_b64 = btoa(all_excludes);
17    }
18
19    $(".view-more a.dynamic-loader:not(.no-duplicate)").click(function (e) {
20        e.preventDefault();
21
22        trig_button = $(this);
23        $(this).addClass("no-duplicate");
24
25        var data = {
26            'action': 'lazy-load',
27            'offset': $(this).attr('data-offset'),
28            'term_id': $(this).attr('data-term-id'),
29            'block_id': $(this).attr('data-block-id'),
30            'class': $(this).attr('data-resulting-class'),
31            'load_number': $(this).attr('data-load-number'),
32            'exclude': all_excludes_b64
33        };
34
35        $.get(lazy_load.ajax_url, data, function (response) {
36
37            // Build selector for pasting the output
38            render_selector = "#lazy-load-" + data.block_id + "-" + data.term_id;
39
40            // Read JSON response
41            out = JSON.parse(response);
42
43            // Check if it was a successful call
44            if (out.status == 'success') {
45
46                // Decode transferred B64
47                out_html = atob(out.body);
48
49                // Lazy load!
50                $(render_selector).append(out_html);
51                // Work out new offset
52                new_offset = +out.offset + +data.load_number;
53
54                // Set new offset to button
55                trig_button.attr('data-offset', new_offset)
56                // Set new payload for IDs to exclude
57                trig_button.attr('data-exclude', out.new_exclude);
58
59                // Check if to hide button
60                if (out.hide == true) {
61                    $(trig_button).hide();
62                }
63
64                // Do we have an error instead?
65            } else if (out.status == 'error') {
66
67                // Hide button and append error message
68                $(trig_button).fadeOut(300, function () {
69                    $(render_selector).append(out.body);
70                });
71            }
72
73            $(trig_button).removeClass("no-duplicate");
74        });
75    });
76});

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.