PageSourceSearch

https://oberoncapcorp.com/_templates/2/source/js/main.js?v=0.988

js oberoncapcorp.com collected 2026-10-04 06:20:48 UTC 8,317 bytes, 246 lines download raw bytes

1
2$(document).ready(function () {
3
4  wow = new WOW({ offset: 0 });
5  wow.init();
6
7  // var widthCheck = function(){ return $('#width-check').css('z-index'); }
8  var resized = function(){ tableSize(); setMobile(); }
9  // MOBILE CHECK 
10  function detectmob() {
11    var $check = $('#width-check').css('z-index');
12    if(!!navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)) {
13      return true;
14    } else if($check != 0) {
15      return true;
16    } else {
17      return false;
18    }
19  }
20  function setMobile(){ detectmob() ? $('body').addClass('mobile') : $('body').removeClass('mobile'); }
21  setMobile();
22
23  // MOBILE TABLE FIX
24  var tableFix = function(){
25    $('#content table').each(function(){
26      if(!$(this).hasClass('nofix')){
27        $(this).wrap("<div class='overflow " + $(this).attr('class') + "'></div>");
28      }
29    });
30  }
31  tableFix();
32  var tableSize = function(){   
33    $('#content div.overflow').each(function(){
34      $(this).next('p.instruction').remove();
35      $(this).after('<p class="instruction">Scroll right to view more <i class="fas fa-arrow-right"></i></p>');
36      var $width = $(this).width();
37      var $scrollWidth = this.scrollWidth;
38      if ($scrollWidth > $width) {
39        $(this).next('p.instruction').addClass('show');
40      }
41    });
42  }
43  tableSize();
44
45  // Explore Next clone link to Image
46  $("#explore_next .learn-more").each(function(){
47    const href = $(this).children("a").attr("href");
48    var link = '<a href="' + href + '" class="learn-more-clone"></a>';
49    $(this).parent("div").append(link);
50  });
51
52  // DESTOP SEARCH 
53  (function(){
54    $("#search_toggle").on("click", function(){
55      if ( $(this).prop("checked") ) {
56        $("header.desktop").addClass("show-search");
57        $(".search-form input.s").focus();
58      } else {
59        $("header.desktop").removeClass("show-search");
60      }
61    });
62  })();
63
64  // ACCORDION 
65  (function(){
66    $('.accordion .title').on('click touch', function(){
67      var panel = $(this).parent();
68
69      if ( panel.attr( "aria-expanded" ) !== "true" ) {
70        panel.attr( "aria-expanded", "true" );
71        $(this).siblings('.content').slideDown();
72      } else {
73        panel.attr( "aria-expanded", "false" );
74        $(this).siblings('.content').slideUp();
75      }
76    });
77  })();
78
79  // ********************* NAV SCROLL ********************* //
80  $(window).bind("scroll", function() {
81    if ($(this).scrollTop() > 10) {
82      $("header.desktop").addClass("fixed");
83      $("header.mobile").addClass("fixed");
84    } else {
85      $("header.desktop").removeClass("fixed");
86      $("header.mobile").removeClass("fixed");
87    }
88  });
89
90
91  //EMAIL SIGNUP
92  function check_email_address(email) {
93    var re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
94    return re.test(email);
95  }
96
97
98var error_checking = function() {
99  $('.required input').focusout(function() {
100    if ($(this).val() == "") {
101      $(this).parent().addClass("error");
102    } else {
103      if ($(this).parent().hasClass("signup-email")) {
104        if (!check_email_address($(this).val())) {
105          $(this).parent().addClass("error");
106        } else {
107          $(this).parent().removeClass('error');
108          $(this).parent().addClass('success');
109        }
110      } else {
111        $(this).parent().removeClass('error');
112        $(this).parent().addClass('success');
113      }
114    }
115  });
116
117
118  $('#signup-form input, #signup-form button').on('click touch', function(){
119    $('.grecaptcha-badge').addClass('show');
120  });
121  $('#signup-form').submit ( function() {
122
123    var $message = $('.signup-message'); // Variable for selecting appropriate signup message
124    $message.empty().hide().fadeIn('slow').append("Please wait..");
125
126    var $this = $(this);
127
128    grecaptcha.ready(function() {                                                  // Call the V3 Recaptcha system
129      grecaptcha.execute($recaptcha_site_key, {action: 'submit'}).then(function(token) {
130        var recaptchaResponse1 = document.getElementById('recaptchaResponse1');    // Call this on hidden recpatcha element in the form
131        recaptchaResponse1.value = token;
132        // Add the below for each unique recaptcha element you have
133        // var recaptchaResponse2 = document.getElementById('recaptchaResponse2');
134        // recaptchaResponse2.value = token;
135     
136        // ORIGINAL AJAX CODE GOES HERE
137
138        var $form = $this,
139          formData = $form.serialize(),
140          formUrl = $form.attr('action'),
141          formMethod = $form.attr('method'),
142          //responseMsg = $('.signup-message');
143          responseMsg = $message;
144
145        $.ajax({     
146          url: formUrl,
147          type: formMethod,
148          data: formData,
149
150          success:function(data){
151            var responseData = jQuery.parseJSON(data);
152            switch(responseData.SUCCESS){
153            case 'false':
154              $form.find(".input-fields").show();
155              responseMsg.empty().hide().fadeIn('slow').append(responseData.CONFIRMATION);
156              break;
157            case 'true':
158              $('.grecaptcha-badge').hide().removeClass('show');
159              $form.find(".input-fields").hide();
160              responseMsg.empty().hide().fadeIn('slow').append(responseData.CONFIRMATION);
161              break;
162            }
163          }
164        });
165      });
166    });
167  return false;
168  });
169}
170error_checking();
171
172  // MODAL
173  // $('.popup-link').on('click', function(e) {
174  //   $('#'+$(this).data('popup')).stop().fadeIn();
175  //   if ($(this).data('popup') == "search-popup") $('#s').focus();
176  // });
177  // $('.popup-container .close').on('click', function(e) {
178  //   $('.popup-container').stop().fadeOut();
179  // });
180
181
182  //MOBILE MENU
183  $('.hamburger').on('click touch', function(e){
184    e.stopPropagation();
185    if($('header.mobile').hasClass("open")) {
186      $(this).parent().siblings('nav').slideUp(300);
187      $('header.mobile').removeClass('open');
188      $(this).attr("aria-expanded","false");
189    } else {
190      $(this).parent().siblings('nav').slideDown(300);
191      $('header.mobile').addClass('open');
192      $(this).attr("aria-expanded","true");
193    }
194  });
195  $('.mobile-menu .has-children a.has-submenu').on('click touch', function(e) {
196    e.preventDefault();
197    if($(this).parent('.has-children').hasClass("active")) {
198        $('.has-children').removeClass('active').children('ul').slideUp(300);
199      } else {
200        $('.has-children').removeClass('active').children('ul').slideUp(300);
201        $(this).parent('.has-children').addClass('active');
202        $(this).siblings('ul').slideDown(300);
203      }
204  });
205  $(window).resize(function() {
206    resized();
207  });
208
209
210
211    // Recent Transactions Slider
212    function setMarquee() {
213      var marqueeWidth = 0;
214      var marqueeSpeed = 0;
215      $(marquee).children('p').each(function(){
216        marqueeWidth += $(this).outerWidth(true);
217        marqueeSpeed++;
218      });
219      marqueeWidth /= 2;
220      marqueeSpeed *= 2.5;
221      document.documentElement.style.setProperty("--marqueeWidth", "-" + marqueeWidth + "px");
222      document.documentElement.style.setProperty("--marqueeSpeed", marqueeSpeed + "s");
223    }
224    const marquee = $("#transactions .flex, #charities .flex");
225    if ( marquee.length ) {
226      var marqueeContent = marquee.html();
227      marquee.append(marqueeContent);
228      setMarquee();
229      $(window).on('resize', function(){ setMarquee(); });
230
231      marquee.on("mouseenter", function() {  $( this ).addClass("stop"); } );
232      marquee.on("mouseleave", function() {  $( this ).removeClass("stop"); } );
233
234      var timerID = undefined;
235      marquee.on( "touchstart", function(e) {
236        var $this = $(this);
237        if ( typeof timerID === "number") { clearTimeout(timerID); }
238        $this.addClass("stop"); 
239        e.stopPropagation();
240        timerID = setTimeout( function(){ $this.removeClass("stop"); }, 2000);
241      } );
242      $('body').on('touchstart', function(e){ marquee.removeClass("stop"); });
243    }
244
245});
246

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.