PageSourceSearch

https://www.arkcity.net/wp-content/plugins/coupon-reveal-button/js/spbcta-nm.js?ver=02b3a0914d7b

js arkcity.net collected 2026-10-02 12:36:39 UTC 3,308 bytes, 113 lines download raw bytes

1var spbctaNM = {};
2(function ($) {
3  spbctaNM.func = {
4    // spbcta functionality
5    spbcta_pass: function (
6      base64String,
7      element,
8      link,
9      target,
10      preview = false
11    ) {
12      //if reveal blank hide reveal
13      if (base64String) {
14        /////
15        if ($(element)[0].hasAttribute("href")) {
16          $(element).addClass("spbcta_selectable");
17          $(element)
18            .children(".reveal__button__hidden__content")
19            .text(
20              decodeURIComponent(escape(atob(base64String))).replace(
21                /&/g,
22                "&"
23              )
24            );
25          if (!preview) $(element).removeAttr("href");
26          $(element)
27            .closest(".reveal__button__wrapper")
28            .addClass("reveal__button__content");
29          spbctaNM.selectText(
30            $(element).children(".reveal__button__hidden__content")[0]
31          );
32          if (!preview) spbctaNM.openLink(link, target);
33        } else {
34          if (!preview) spbctaNM.openLink(link, target);
35        }
36      }
37    },
38  };
39  spbctaNM.openLink = function (link, target) {
40    if (target == 1) {
41      window.open(link, "_blank");
42    } else {
43      location.href = link;
44    }
45  };
46
47  spbctaNM.selectText = function (element) {
48    var range = document.createRange();
49    range.selectNodeContents(element);
50    var sel = window.getSelection();
51    sel.removeAllRanges();
52    sel.addRange(range);
53  };
54})(jQuery);
55
56jQuery(document).ready(function ($) {
57  spbcta_resize();
58  setTimeout(function () {
59    spbcta_resize();
60  }, 1000);
61  let spbcta_timer;
62  $(window).resize(function () {
63    clearTimeout(spbcta_timer);
64    spbcta_timer = setTimeout(function () {
65      spbcta_resize();
66    }, 100);
67  });
68
69  function spbcta_resize() {
70    /*
71		$(".reveal__button__hidden__content").each(function(){
72			$(this).css({
73			'min-width': ($(this).siblings(".reveal__button__text").width() + 'px')
74			});
75		});
76		*/
77    $(".reveal__button__wrapper").each(function () {
78      const text_height = $(this)
79        .children(".reveal__button__link:not(.spbcta_selectable)")
80        .children(".reveal__button__text")
81        .height();
82      if (text_height == null || text_height === undefined) {
83        const element = $(this)
84          .children(".reveal__button__link")
85          .children(".reveal__button__hidden__content");
86        element.height("auto");
87        element.width("");
88      } else {
89        const element = $(this)
90          .children(".reveal__button__link")
91          .children(".reveal__button__hidden__content");
92        element.height(text_height);
93        element.width("");
94        const existing_style = element.attr("style");
95        const width_padding = 35;
96        const text_width =
97          $(this)
98            .children(".reveal__button__link:not(.spbcta_selectable)")
99            .children(".reveal__button__text")
100            .outerWidth() + width_padding;
101        element.attr(
102          "style",
103          "width:" + text_width + "px !important; " + existing_style
104        );
105      }
106      //$(this).height(text_height);
107    });
108  }
109
110  $(".reveal__button__link").click(function () {
111    spbcta_resize();
112  });
113});

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.