PageSourceSearch

https://gumpla.jp/wp-content/themes/gush/assets/js/ajax_load.js?ver019&ver=3.4.1

js gumpla.jp collected 2026-10-03 22:13:58 UTC 2,243 bytes, 82 lines download raw bytes

1$('#load-btn').on('click', function() {
2  dispLoading();
3  let btn = $(this)
4  let ptype = btn.data('ptype');
5  let ptagin = btn.data('ptagin');
6  let ptax = btn.data('ptax');
7  let pterm = btn.data('pterm');
8  let paged = btn.data('paged');
9  let next_paged = Number(paged) + 1;
10  btn.attr('data-paged', next_paged);
11  btn.data('paged', next_paged);
12  let parent = $(this).parent().parent('.l-wrapper').find('.l-grid__list-item:last-child,.l-grid-lg__list-item:last-child');
13  let post_per_page = 20;
14
15  $.ajax({
16    type: 'GET',
17    cache: false,
18    url: localize.ajax_url,
19    data: {
20      'action': 'display_ajax_load',
21      'ptype': ptype,
22      'ptagin': ptagin,
23      'ptax': ptax,
24      'pterm': pterm,
25      'paged': paged,
26      'nonce': localize.nonce
27    },
28    success: function (response) {
29      if (response.length > 0) {
30        if (response.match(/l-grid__list-item|l-grid-lg__list-item/g).length > 0) {
31          parent.after(response);
32          if (response.match(/l-grid-lg__list-item/g)) {
33            instance.runOnImageLoad(function () {
34              masonry.recalculate(true);
35            }, true);
36          }
37          if (response.match(/l-grid__list-item|l-grid-lg__list-item/g).length < post_per_page) {
38          }
39        }
40      } else {
41      }
42    }
43  })
44    // 処理終了時
45    .always(function (response) {
46      removeLoading();
47    });
48
49    if (pall == next_paged) {
50      $('.c-button__plain').remove();
51      $('.c-button__ajax').css({'min-height':'0','margin-top':'0'});
52    };
53    
54
55
56  return false;
57  
58});
59
60
61
62/* ------------------------------
63 Loading
64 ------------------------------ */
65function dispLoading(msg) {
66  if (msg == undefined) {
67    msg = "";
68  }
69  var dispMsg = "<div class='loadingMsg'>" + msg + "</div>";
70  if ($("#loading").length == 0) {
71    $(".c-button__ajax").append("<div class='c-button__loading' id='loading'><img class='c-ajax-spinner__image' src='/wp-content/themes/gush/assets/img/loading-dots.svg'></div>");
72  }
73}
74
75function removeLoading() {
76  $("#loading").fadeOut('fast').queue(function () {
77    $("#loading").remove();
78    $('.c-button__ajax').removeClass('open-menu');
79  })
80}
81
82

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.