Submit
Path:
~
/
/
proc
/
self
/
root
/
usr
/
local
/
sitepad
/
editor
/
site-data
/
plugins
/
kkart-pro
/
assets
/
js
/
frontend
/
File Content:
geolocation.js
/*global kkart_geolocation_params */ jQuery( function( $ ) { var this_page = window.location.toString(); var $append_hashes = function() { if ( kkart_geolocation_params.hash ) { $( 'a[href^="' + kkart_geolocation_params.home_url + '"]:not(a[href*="v="]), a[href^="/"]:not(a[href*="v="])' ).each( function() { var $this = $( this ), href = $this.attr( 'href' ), href_parts = href.split( '#' ); href = href_parts[0]; if ( href.indexOf( '?' ) > 0 ) { href = href + '&v=' + kkart_geolocation_params.hash; } else { href = href + '?v=' + kkart_geolocation_params.hash; } if ( typeof href_parts[1] !== 'undefined' && href_parts[1] !== null ) { href = href + '#' + href_parts[1]; } $this.attr( 'href', href ); }); } }; var $geolocation_redirect = function( hash ) { if ( this_page.indexOf( '?v=' ) > 0 || this_page.indexOf( '&v=' ) > 0 ) { this_page = this_page.replace( /v=[^&]+/, 'v=' + hash ); } else if ( this_page.indexOf( '?' ) > 0 ) { this_page = this_page + '&v=' + hash; } else { this_page = this_page + '?v=' + hash; } window.location = this_page; }; var $geolocate_customer = { url: kkart_geolocation_params.kkart_ajax_url.toString().replace( '%%endpoint%%', 'get_customer_location' ), type: 'GET', success: function( response ) { if ( response.success && response.data.hash && response.data.hash !== kkart_geolocation_params.hash ) { $geolocation_redirect( response.data.hash ); } } }; if ( '1' === kkart_geolocation_params.is_available ) { $.ajax( $geolocate_customer ); // Support form elements $( 'form' ).each( function() { var $this = $( this ); var method = $this.attr( 'method' ); var hasField = $this.find('input[name="v"]').length > 0; if ( method && 'get' === method.toLowerCase() && !hasField ) { $this.append( '<input type="hidden" name="v" value="' + kkart_geolocation_params.hash + '" />' ); } else { var href = $this.attr( 'action' ); if ( href ) { if ( href.indexOf( '?' ) > 0 ) { $this.attr( 'action', href + '&v=' + kkart_geolocation_params.hash ); } else { $this.attr( 'action', href + '?v=' + kkart_geolocation_params.hash ); } } } }); // Append hashes on load $append_hashes(); } $( document.body ).on( 'added_to_cart', function() { $append_hashes(); }); // Enable user to trigger manual append hashes on AJAX operations $( document.body ).on( 'kkart_append_geo_hashes', function() { $append_hashes(); }); });
Submit
FILE
FOLDER
Name
Size
Permission
Action
add-payment-method.js
1079 bytes
0644
add-payment-method.min.js
721 bytes
0644
add-to-cart-variation.js
28543 bytes
0644
add-to-cart-variation.min.js
13600 bytes
0644
add-to-cart.js
5821 bytes
0644
add-to-cart.min.js
3073 bytes
0644
address-i18n.js
4955 bytes
0644
address-i18n.min.js
2618 bytes
0644
cart-fragments.js
5708 bytes
0644
cart-fragments.min.js
2989 bytes
0644
cart.js
15616 bytes
0644
cart.min.js
7509 bytes
0644
checkout.js
24797 bytes
0644
checkout.min.js
13875 bytes
0644
country-select.js
6187 bytes
0644
country-select.min.js
3298 bytes
0644
credit-card-form.js
612 bytes
0644
credit-card-form.min.js
542 bytes
0644
geolocation.js
2559 bytes
0644
geolocation.min.js
1334 bytes
0644
kkart.js
3237 bytes
0644
kkart.min.js
1963 bytes
0644
lost-password.js
159 bytes
0644
lost-password.min.js
132 bytes
0644
password-strength-meter.js
3807 bytes
0644
password-strength-meter.min.js
2024 bytes
0644
price-slider.js
2923 bytes
0644
price-slider.min.js
2035 bytes
0644
single-product.js
10359 bytes
0644
single-product.min.js
6272 bytes
0644
tokenization-form.js
3814 bytes
0644
tokenization-form.min.js
2227 bytes
0644
N4ST4R_ID | Naxtarrr