uawdijnntqw1x1x1
IP : 216.73.216.109
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
.
/
public_html
/
wp-content
/
plugins
/
charitable
/
assets
/
js
/
charitable-credit-card.min.js
/
/
CHARITABLE=window.CHARITABLE||{};(function($){var card_number_prev_val="";var on_input_card_number=function(e){var current_val=e.target.value;var is_amex=/^3(4|7)/.test(current_val);var max_length=is_amex?17:19;var cursor_position=this.selectionStart;var current_val_formatted="";current_val.split("").forEach((function(char){var idx=current_val_formatted.length;if(is_amex){if((idx===4||idx===11)&&char!==" "){current_val_formatted+=" ";if(cursor_position===idx+1){cursor_position++}}else if(idx!==4&&idx!==11&&char===" "){return}}else{if((idx+1)%5===0&&char!==" "){current_val_formatted+=" ";if(cursor_position===idx+1){cursor_position++}}else if((idx+1)%5!==0&&char===" "){return}}current_val_formatted+=char}));if(/[^\d^\s]/.test(current_val)||current_val.length>max_length){e.target.value=card_number_prev_val;this.setSelectionRange(cursor_position-1,cursor_position-1)}else{card_number_prev_val=e.target.value=current_val_formatted;this.setSelectionRange(cursor_position,cursor_position)}};CHARITABLE.Donation_Form.prototype.is_valid_card_number=function(){ /** * Luhn algorithm in JavaScript: validate credit card number supplied as string of numbers * @author ShirtlessKirk. Copyright (c) 2012. * @license WTFPL (http://www.wtfpl.net/txt/copying) */ var luhnChk=function(a){return function(c){for(var l=c.length,b=1,s=0,v;l;)v=parseInt(c.charAt(--l),10),s+=(b^=1)?a[v]:v;return s&&0===s%10}}([0,2,4,6,8,1,3,5,7,9]);var cc_number=this.get_cc_number().replace(/ /g,"");return luhnChk(cc_number)};CHARITABLE.Donation_Form.prototype.validate_card_number=function(){var require_cc=$("#charitable-gateway-fields-"+this.get_payment_method()+" #charitable_field_cc_number");if(0===require_cc.length){return true}if(false===this.is_valid_card_number()){this.add_error(CHARITABLE_VARS.error_invalid_cc_number);return false}return true};var $body=$("body");$body.on("charitable:form:initialize",(function(){$body.on("input",'input[name="cc_number"]',on_input_card_number)}));$body.on("charitable:form:validate",(function(event,helper){if("make_donation"===helper.get_input("charitable_action").val()){helper.validate_card_number()}}))})(jQuery);
/home/batcwwjx/./public_html/wp-content/plugins/charitable/assets/js/charitable-credit-card.min.js