PageSourceSearch

https://beverage-digest.com/javascripts/pages/profile.js?v=1790926200

js beverage-digest.com collected 2026-10-02 07:22:58 UTC 2,125 bytes, 85 lines download raw bytes

1require(['components/add-to-cart-update'], function(AddToCartUpdate){
2  $(function() {
3    new AddToCartUpdate('#order-history', {
4      cartButtonClass: '.order-history-item__add-to-cart-link'
5    });
6  });
7});
8
9function checkCountry () {
10  var $postalCode = $('#user_postal_code');
11  var $state = $("#user_state");
12
13  if ($("#user_country").find('option:selected').text() == 'United States') {
14    $postalCode
15      .addClass('required')
16      .siblings('label')
17      .addClass('required')
18      .append('<span class="red">*</span>');
19
20    $state
21      .addClass('required')
22      .siblings('label')
23      .addClass('required') // on label
24      .append('<span class="red">*</span>');
25  }
26}
27
28function customInit() {
29
30  if ($('#login_form').length) {
31    var $refererField = $('#login_form').find('input[name=referer]');
32    $refererField.val($refererField.val() + location.hash);
33  }
34
35	$("#section-2 .box1 .navigation ul.level1").tabs("#section-2 .box1 #tabs > div.records");
36	$("#section-2 .box2 .navigation ul.level1").tabs("#section-2 .box2 div.records");
37
38  if ($("#user_country").length) {checkCountry();}
39
40  $("#user_country").change(function() {
41    checkCountry();
42  });
43  
44  $("#profile").bind("invalid", function(e) {
45    $("#section-2 .box1 .navigation ul.level1 li.level1-li:first a").click();
46  });
47
48  $("#login_form").validate({
49		rules: {
50			user_email: "required",
51			user_password: "required"
52		}
53	});
54
55  $("#forgot_form").validate({
56		rules: {
57			user_email: "required"
58		}
59	});
60  $("#register, #profile").validate({
61    ignore: [],
62    rules: {
63       //postal codes can be only numeric in US
64      'user[postal_code]': {
65        digits: {
66          depends: function(element){
67            return $("#user_country").find('option:selected').text() == 'United States';
68          }
69        }
70      },
71      "hiddenRecaptcha": {
72        required: function() {
73          if(grecaptcha.getResponse() == '') {
74            return true;
75          } else {
76            return false;
77          }
78        }
79      }
80    },
81    messages: {
82      "hiddenRecaptcha": $("#captcha").data('recaptcha-error')
83    }
84  });
85}

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.