PageSourceSearch

https://www.protectorplan.com/wp-content/themes/genesis-child/js/scripts.js?ver=7.1.2

js protectorplan.com collected 2026-10-04 12:17:50 UTC 3,349 bytes, 117 lines download raw bytes

1(function ($) {
2  $doc = $(document);
3
4  $doc.ready(function () {
5    /**
6     * Retrieve posts
7     */
8    function get_posts($params) {
9      $container = $("#container-async");
10      $content = $container.find(".content");
11      $status = $container.find(".status");
12      $status.show();
13      $status.text("Loading Documents ...");
14
15      $.ajax({
16        url: bobz.ajax_url,
17        data: {
18          action: "do_filter_posts",
19          nonce: bobz.nonce,
20          params: $params,
21        },
22        type: "post",
23        dataType: "json",
24        success: function (data, textStatus, XMLHttpRequest) {
25          if (data.status === 200) {
26            $content.html(data.content);
27            var target = $("option:selected").val() + "hhhhh";
28            if (
29              target === "Alaska" ||
30              target === "Hawaii" ||
31              target === "Louisiana"
32            ) {
33              console.log(target);
34              $(".download-row").hide();
35              $(".states-warning").addClass("alert");
36            } else {
37              $(".states-warning").removeClass("alert");
38            }
39          } else if (data.status === 201) {
40            $content.html(data.message);
41          } else {
42            $status.html(data.message);
43          }
44        },
45        error: function (MLHttpRequest, textStatus, errorThrown) {
46          $status.html(textStatus);
47
48          /*console.log(MLHttpRequest);
49					console.log(textStatus);
50					console.log(errorThrown);*/
51        },
52        complete: function (data, textStatus) {
53          msg = textStatus;
54
55          if (textStatus === "success") {
56            msg = data.responseJSON.found;
57          }
58
59          //$status.text("Posts found: " + msg);
60          $status.hide();
61          // console.log(data);
62          // console.log(textStatus);
63
64          /*console.log(data);
65	            	console.log(textStatus);*/
66        },
67      });
68    }
69    /**
70     * Bind get_posts to tag cloud and navigation
71     */
72    $("#state").change("option[data-filter]", function (event) {
73      if (event.preventDefault) {
74        event.preventDefault();
75      }
76
77      $this = $(this);
78      console.log($this);
79      console.log($this.find("option").data("filter"));
80      /**
81       * Set filter active
82       */
83      if ($this.find("option").data("filter")) {
84        $this.find("option:first-child").removeClass("active");
85        $this.find("option:selected").addClass("active").siblings();
86        //          .removeClass("active");
87        $page = $this.data("page");
88      } else {
89        /**
90         * Pagination
91         */
92        // $page = parseInt();
93        $this = $(".nav-filter .active");
94      }
95      $this.closest("option").data("term");
96      console.log("end of function?");
97
98      $params = {
99        // page: $page,
100        tax: $this.find("option").data("filter"),
101        term: $this.find("option:selected").data("term"),
102        qty: $this.closest("#container-async").data("paged"),
103      };
104
105      const qString = window.location.search;
106      const urlParams = new URLSearchParams(qString)
107
108      if(urlParams.has('preview') && 'true' === urlParams.get('preview')){
109        $params.isPreview = true;
110      }
111
112      // Run query
113      get_posts($params);
114    });
115    $(".select7-selection__placeholder").text("Select a State...");
116  });
117})(jQuery);

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.