window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/14.0.0\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/dissident7.com\/wp-includes\/js\/wp-emoji-release.min.js?ver=6.3.3"}};
/*! This file is auto-generated */
!function(i,n){var o,s,e;function c(e){try{var t={supportTests:e,timestamp:(new Date).valueOf()};sessionStorage.setItem(o,JSON.stringify(t))}catch(e){}}function p(e,t,n){e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(t,0,0);var t=new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data),r=(e.clearRect(0,0,e.canvas.width,e.canvas.height),e.fillText(n,0,0),new Uint32Array(e.getImageData(0,0,e.canvas.width,e.canvas.height).data));return t.every(function(e,t){return e===r[t]})}function u(e,t,n){switch(t){case"flag":return n(e,"\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f","\ud83c\udff3\ufe0f\u200b\u26a7\ufe0f")?!1:!n(e,"\ud83c\uddfa\ud83c\uddf3","\ud83c\uddfa\u200b\ud83c\uddf3")&&!n(e,"\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f","\ud83c\udff4\u200b\udb40\udc67\u200b\udb40\udc62\u200b\udb40\udc65\u200b\udb40\udc6e\u200b\udb40\udc67\u200b\udb40\udc7f");case"emoji":return!n(e,"\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c\udfff","\ud83e\udef1\ud83c\udffb\u200b\ud83e\udef2\ud83c\udfff")}return!1}function f(e,t,n){var r="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?new OffscreenCanvas(300,150):i.createElement("canvas"),a=r.getContext("2d",{willReadFrequently:!0}),o=(a.textBaseline="top",a.font="600 32px Arial",{});return e.forEach(function(e){o[e]=t(a,e,n)}),o}function t(e){var t=i.createElement("script");t.src=e,t.defer=!0,i.head.appendChild(t)}"undefined"!=typeof Promise&&(o="wpEmojiSettingsSupports",s=["flag","emoji"],n.supports={everything:!0,everythingExceptFlag:!0},e=new Promise(function(e){i.addEventListener("DOMContentLoaded",e,{once:!0})}),new Promise(function(t){var n=function(){try{var e=JSON.parse(sessionStorage.getItem(o));if("object"==typeof e&&"number"==typeof e.timestamp&&(new Date).valueOf()<e.timestamp+604800&&"object"==typeof e.supportTests)return e.supportTests}catch(e){}return null}();if(!n){if("undefined"!=typeof Worker&&"undefined"!=typeof OffscreenCanvas&&"undefined"!=typeof URL&&URL.createObjectURL&&"undefined"!=typeof Blob)try{var e="postMessage("+f.toString()+"("+[JSON.stringify(s),u.toString(),p.toString()].join(",")+"));",r=new Blob([e],{type:"text/javascript"}),a=new Worker(URL.createObjectURL(r),{name:"wpTestEmojiSupports"});return void(a.onmessage=function(e){c(n=e.data),a.terminate(),t(n)})}catch(e){}c(n=f(s,u,p))}t(n)}).then(function(e){for(var t in e)n.supports[t]=e[t],n.supports.everything=n.supports.everything&&n.supports[t],"flag"!==t&&(n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&n.supports[t]);n.supports.everythingExceptFlag=n.supports.everythingExceptFlag&&!n.supports.flag,n.DOMReady=!1,n.readyCallback=function(){n.DOMReady=!0}}).then(function(){return e}).then(function(){var e;n.supports.everything||(n.readyCallback(),(e=n.source||{}).concatemoji?t(e.concatemoji):e.wpemoji&&e.twemoji&&(t(e.twemoji),t(e.wpemoji)))}))}((window,document),window._wpemojiSettings);
https://dissident7.com/wp-includes/js/dist/vendor/wp-polyfill-inert.min.js
https://dissident7.com/wp-includes/js/dist/vendor/regenerator-runtime.min.js
https://dissident7.com/wp-includes/js/dist/vendor/wp-polyfill.min.js
https://dissident7.com/wp-includes/js/dist/dom-ready.min.js
https://dissident7.com/wp-content/plugins/auto-terms-of-service-and-privacy-policy/js/base.js
var WoowGallery = {"ajaxurl":"https:\/\/dissident7.com\/wp-admin\/admin-ajax.php","wpApiRoot":"https:\/\/dissident7.com\/wp-json\/","g11n":[],"skins":null,"i":"231002v1.2.0"};
https://dissident7.com/wp-content/plugins/woowgallery/assets/js/woowgallery.min.js
var breeze_prefetch = {"local_url":"https:\/\/dissident7.com","ignore_remote_prefetch":"1","ignore_list":["wp-admin","wp-login.php"]};
https://dissident7.com/wp-content/plugins/breeze/assets/js/js-front-end/breeze-prefetch-links.min.js
window.OneSignalDeferred = window.OneSignalDeferred || [];
OneSignalDeferred.push(async function(OneSignal) {
await OneSignal.init({
appId: "d33b4fa2-33eb-4dfc-9c1a-d55a4cd44b5f",
serviceWorkerOverrideForTypical: true,
path: "https://dissident7.com/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/",
serviceWorkerParam: { scope: "/wp-content/plugins/onesignal-free-web-push-notifications/sdk_files/push/onesignal/" },
serviceWorkerPath: "OneSignalSDKWorker.js",
});
});
// Unregister the legacy OneSignal service worker to prevent scope conflicts
navigator.serviceWorker.getRegistrations().then((registrations) => {
// Iterate through all registered service workers
registrations.forEach((registration) => {
// Check the script URL to identify the specific service worker
if (registration.active && registration.active.scriptURL.includes('OneSignalSDKWorker.js.php')) {
// Unregister the service worker
registration.unregister().then((success) => {
if (success) {
console.log('OneSignalSW: Successfully unregistered:', registration.active.scriptURL);
} else {
console.log('OneSignalSW: Failed to unregister:', registration.active.scriptURL);
}
});
}
});
}).catch((error) => {
console.error('Error fetching service worker registrations:', error);
});
var VPData = {"version":"3.1.3","pro":false,"__":{"couldnt_retrieve_vp":"Couldn't retrieve Visual Portfolio ID.","pswp_close":"Close (Esc)","pswp_share":"Share","pswp_fs":"Toggle fullscreen","pswp_zoom":"Zoom in\/out","pswp_prev":"Previous (arrow left)","pswp_next":"Next (arrow right)","pswp_share_fb":"Share on Facebook","pswp_share_tw":"Tweet","pswp_share_pin":"Pin it","fancybox_close":"Close","fancybox_next":"Next","fancybox_prev":"Previous","fancybox_error":"The requested content cannot be loaded. <br \/> Please try again later.","fancybox_play_start":"Start slideshow","fancybox_play_stop":"Pause slideshow","fancybox_full_screen":"Full screen","fancybox_thumbs":"Thumbnails","fancybox_download":"Download","fancybox_share":"Share","fancybox_zoom":"Zoom"},"settingsPopupGallery":{"enable_on_wordpress_images":false,"vendor":"fancybox","deep_linking":false,"deep_linking_url_to_share_images":false,"show_arrows":true,"show_counter":true,"show_zoom_button":true,"show_fullscreen_button":true,"show_share_button":true,"show_close_button":true,"show_thumbs":true,"show_download_button":false,"show_slideshow":false,"click_to_zoom":true,"restore_focus":true},"screenSizes":[320,576,768,992,1200]};
(function(url){
if(/(?:Chrome\/26\.0\.1410\.63 Safari\/537\.31|WordfenceTestMonBot)/.test(navigator.userAgent)){ return; }
var addEvent = function(evt, handler) {
if (window.addEventListener) {
document.addEventListener(evt, handler, false);
} else if (window.attachEvent) {
document.attachEvent('on' + evt, handler);
}
};
var removeEvent = function(evt, handler) {
if (window.removeEventListener) {
document.removeEventListener(evt, handler, false);
} else if (window.detachEvent) {
document.detachEvent('on' + evt, handler);
}
};
var evts = 'contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop keydown keypress keyup mousedown mousemove mouseout mouseover mouseup mousewheel scroll'.split(' ');
var logHuman = function() {
if (window.wfLogHumanRan) { return; }
window.wfLogHumanRan = true;
var wfscr = document.createElement('script');
wfscr.type = 'text/javascript';
wfscr.async = true;
wfscr.src = url + '&r=' + Math.random();
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(wfscr);
for (var i = 0; i < evts.length; i++) {
removeEvent(evts[i], logHuman);
}
};
for (var i = 0; i < evts.length; i++) {
addEvent(evts[i], logHuman);
}
})('//dissident7.com/?wordfence_lh=1&hid=962B6A1A71F15BB4183BC7AF4EEB75D2');
var clicky_custom = clicky_custom || {};
clicky_custom.outbound_pattern = ['/go/','/out/'];
document.documentElement.classList.add(
'vp-lazyload-enabled'
);
You do not have anything in your cart yet!
(function () {
// forEach polyfill
if (!NodeList.prototype.forEach) {
NodeList.prototype.forEach = function (callback) {
for (var i = 0; i < this.length; i++) {
callback.call(this, this.item(i));
}
}
}
var navigation = document.querySelector('[data-colibri-navigation-overlap="true"], .h-navigation_overlap');
if (navigation) {
var els = document
.querySelectorAll('.h-navigation-padding');
if (els.length) {
els.forEach(function (item) {
item.style.paddingTop = navigation.offsetHeight + "px";
});
}
}
})();
window.kubioFrontendData = [];
( function() {
var skipLinkTarget = document.querySelector( 'main' ),
sibling,
skipLinkTargetID,
skipLink;
// Early exit if a skip-link target can't be located.
if ( ! skipLinkTarget ) {
return;
}
/*
* Get the site wrapper.
* The skip-link will be injected in the beginning of it.
*/
sibling = document.querySelector( '.wp-site-blocks' );
// Early exit if the root element was not found.
if ( ! sibling ) {
return;
}
// Get the skip-link target's ID, and generate one if it doesn't exist.
skipLinkTargetID = skipLinkTarget.id;
if ( ! skipLinkTargetID ) {
skipLinkTargetID = 'wp--skip-link--target';
skipLinkTarget.id = skipLinkTargetID;
}
// Create the skip link.
skipLink = document.createElement( 'a' );
skipLink.classList.add( 'skip-link', 'screen-reader-text' );
skipLink.href = '#' + skipLinkTargetID;
skipLink.innerHTML = 'Skip to content';
// Inject the skip link.
sibling.parentElement.insertBefore( skipLink, sibling );
}() );
https://dissident7.com/wp-content/plugins/fitvids-for-wordpress/jquery.fitvids.js
https://dissident7.com/wp-content/plugins/kubio/build/scripts/index.js
https://dissident7.com/wp-content/plugins/kubio/build/frontend/index.js
https://dissident7.com/wp-content/plugins/breeze/assets/js/js-front-end/breeze-lazy-load.min.js
document.querySelectorAll('img[data-breeze]').forEach(img=>{if(img.getBoundingClientRect().top<=window.innerHeight){img.src=img.getAttribute('data-breeze');img.removeAttribute('data-breeze')}});
var sunshine_photo_cart = {"ajax_url":"https:\/\/dissident7.com\/wp-admin\/admin-ajax.php","security":"44f51ea2dd","lang":{"error":"Sorry, there was an error with your request","max_images":"You have already selected the maximum number of photos allowed"}};
https://dissident7.com/wp-content/plugins/sunshine-photo-cart/assets/js/sunshine.js
var sunshine_photo_cart_checkout = {"ajax_url":"https:\/\/dissident7.com\/wp-admin\/admin-ajax.php","security":"633ffd6524"};
https://dissident7.com/wp-content/plugins/sunshine-photo-cart/assets/js/checkout.js
function heateorSssLoadEvent(e) {var t=window.onload;if (typeof window.onload!="function") {window.onload=e}else{window.onload=function() {t();e()}}}; var heateorSssSharingAjaxUrl = 'https://dissident7.com/wp-admin/admin-ajax.php', heateorSssCloseIconPath = 'https://dissident7.com/wp-content/plugins/sassy-social-share/public/../images/close.png', heateorSssPluginIconPath = 'https://dissident7.com/wp-content/plugins/sassy-social-share/public/../images/logo.png', heateorSssHorizontalSharingCountEnable = 0, heateorSssVerticalSharingCountEnable = 0, heateorSssSharingOffset = -10; var heateorSssMobileStickySharingEnabled = 0;var heateorSssCopyLinkMessage = "Link copied.";var heateorSssUrlCountFetched = [], heateorSssSharesText = 'Shares', heateorSssShareText = 'Share';function heateorSssPopup(e) {window.open(e,"popUpWindow","height=400,width=600,left=400,top=100,resizable,scrollbars,toolbar=0,personalbar=0,menubar=no,location=no,directories=no,status")}
https://dissident7.com/wp-content/plugins/sassy-social-share/public/js/sassy-social-share-public.js
jQuery(document).ready(function () {
jQuery('.entry-content').fitVids();
});
const sunshine_active_section = "contact";
function sunshine_checkout_updating() {
jQuery( '#sunshine--checkout' ).addClass( 'sunshine--loading' );
}
function sunshine_checkout_updating_done() {
jQuery( '#sunshine--checkout' ).removeClass( 'sunshine--loading' );
}
jQuery( document ).ready(function($){
function sunshine_reload_checkout( section = '' ) {
sunshine_checkout_updating();
$.ajax({
type: 'GET',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: {
action: 'sunshine_checkout_update',
section: section,
security: "928e0b1982"
},
success: function( result, textStatus, XMLHttpRequest ) {
if ( result.success ) {
if ( result.data.refresh ) {
window.location.href = window.location.protocol + "//" + window.location.host + window.location.pathname;
}
$( '#sunshine--checkout' ).replaceWith( result.data.html );
$( '#sunshine--checkout input, #sunshine--checkout select' ).trigger( 'conditional' );
$( document ).trigger( 'sunshine_reload_checkout', [ result.data.section ] );
$( '.sunshine--checkout--section-active' ).find( 'input:visible, select:visible' ).first().focus();
} else {
var newURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
if ( section ) {
newURL += "?section=" + section;
}
window.location.href = newURL;
}
sunshine_checkout_updating_done();
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert( 'Sorry, there was an error with your request' );
sunshine_checkout_updating_done();
}
});
return false;
}
$( 'body' ).on( 'submit', '#sunshine--checkout--steps form', function(e){
sunshine_checkout_updating();
var section = $( 'input[name="sunshine_checkout_section"]' ).val();
// Process all sections except payment, that gets normal submit.
if ( section != 'payment' ) {
e.preventDefault();
var form_data = new FormData( $( '#sunshine--checkout form' )[0] );
form_data.append( 'action', 'sunshine_checkout_process_section' );
form_data.append( 'security', "f764f6e82f" );
$.ajax({
async: true,
type: 'POST',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: form_data,
cache: false,
processData: false,
contentType: false,
success: function( result, textStatus, XMLHttpRequest ) {
if ( result.success ) {
if ( result.data.next_section ) {
sunshine_reload_checkout();
$( document ).trigger( 'sunshine_checkout_load_' + result.data.next_section );
}
} else {
var baseURL = window.location.protocol + "//" + window.location.host + window.location.pathname;
var newURL = baseURL + "?section=" + section;
window.location.href = newURL;
}
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert( 'Sorry, there was an error with your request' );
}
});
}
});
// Auto click the first payment option.
$( document ).on( 'sunshine_reload_checkout', function( event, section ) {
if ( section == 'payment' ) {
setTimeout(function() {
var payment_methods = $( '#sunshine--form--field--payment_method' ).find( 'input' );
if ( payment_methods.length ) {
//payment_methods[0].click();
//$( payment_methods[0] ).trigger( 'change' );
}
}, 500 );
}
});
$( document ).trigger( 'sunshine_reload_checkout', [ sunshine_active_section ] );
$( 'body' ).on( 'click', '.sunshine--checkout--section-edit', function(e) {
e.preventDefault();
// Change URL
var section = $( this ).data( 'section' );
// Change content
sunshine_reload_checkout( section );
return false;
});
$( document ).on( 'change', 'input[name="delivery_method"]', function(){
var sunshine_selected_delivery_method = $( 'input[name="delivery_method"]:checked' ).val();
sunshine_checkout_updating();
$.ajax({
type: 'POST',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: {
action: 'sunshine_checkout_select_delivery_method',
delivery_method: sunshine_selected_delivery_method,
security: "defb09ca6c"
},
success: function( result, textStatus, XMLHttpRequest ) {
if ( result.data.summary ) {
$( '#sunshine--checkout--summary' ).html( result.data.summary );
}
if ( result.data.needs_shipping ) {
$( '#sunshine--checkout--shipping, #sunshine--checkout--shipping_method' ).show();
} else {
$( '#sunshine--checkout--shipping, #sunshine--checkout--shipping_method' ).hide();
}
sunshine_checkout_updating_done();
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert( 'Sorry, there was an error with your request' );
sunshine_checkout_updating_done();
}
});
});
$( document ).on( 'change', 'input[name="shipping_method"]', function(){
var sunshine_selected_shipping_method = $( 'input[name="shipping_method"]:checked' ).val();
sunshine_checkout_updating();
$.ajax({
type: 'POST',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: {
action: 'sunshine_checkout_select_shipping_method',
shipping_method: sunshine_selected_shipping_method,
security: "d6c78df6f4"
},
success: function( result, textStatus, XMLHttpRequest ) {
if ( result.data.summary ) {
$( '#sunshine--checkout--summary' ).html( result.data.summary );
}
sunshine_checkout_updating_done();
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert( 'Sorry, there was an error with your request' );
sunshine_checkout_updating_done();
}
});
});
$( document ).on( 'change', 'input[name="use_credits"]', function(){
var sunshine_use_credits = $( 'input[name="use_credits"]:checked' ).val() || false;
sunshine_checkout_updating();
$.ajax({
type: 'POST',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: {
action: 'sunshine_checkout_use_credits',
use_credits: sunshine_use_credits,
security: "3e0b12d2bd"
},
success: function( result, textStatus, XMLHttpRequest ) {
if ( result.success ) {
sunshine_reload_checkout();
}
sunshine_checkout_updating_done();
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert( 'Sorry, there was an error with your request' );
sunshine_checkout_updating_done();
}
});
});
$( document ).on( 'change', 'input[name="payment_method"]', function(){
var sunshine_selected_payment_method = $( 'input[name="payment_method"]:checked' ).val();
sunshine_checkout_updating();
$( '.sunshine--checkout--payment-method--extra' ).hide();
$.ajax({
type: 'POST',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: {
action: 'sunshine_checkout_select_payment_method',
payment_method: sunshine_selected_payment_method,
security: "dfd1024676"
},
success: function( result, textStatus, XMLHttpRequest ) {
$( '#sunshine--checkout--payment-method--extra--' + sunshine_selected_payment_method ).show();
var sunshine_checkout_payment_event = new CustomEvent( 'sunshine_checkout_payment_change', { detail: sunshine_selected_payment_method } );
document.dispatchEvent( sunshine_checkout_payment_event );
if ( result.data && result.data.summary ) {
$( '#sunshine--checkout--summary' ).html( result.data.summary );
}
if ( result.data && result.data.submit_label ) {
$( '#sunshine--checkout--submit' ).html( result.data.submit_label );
}
sunshine_checkout_updating_done();
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert( 'Sorry, there was an error with your request' );
sunshine_checkout_updating_done();
}
});
});
sunshine_state_change_security = '2afc0b41d7';
$( document ).on( 'change', 'select[name="shipping_country"]', function(){
sunshine_checkout_updating();
var sunshine_selected_shipping_country = $( this ).val();
var sunshine_selected_shipping_country_required;
if ( $( this ).prop( 'required' ) ) {
sunshine_selected_shipping_country_required = true;
}
setTimeout( function () {
$.ajax({
type: 'POST',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: {
action: 'sunshine_checkout_update_state',
country: sunshine_selected_shipping_country,
type: 'shipping',
required: sunshine_selected_shipping_country_required,
security: sunshine_state_change_security
},
success: function(output, textStatus, XMLHttpRequest) {
if ( output ) {
$( '#sunshine--checkout--shipping .sunshine--form--fields' ).html( '' );
$( '#sunshine--checkout--shipping .sunshine--form--fields' ).html( output );
//sunshine_mark_filled();
}
$( document ).trigger( 'sunshine_shipping_country_change', [ sunshine_selected_shipping_country ] );
sunshine_checkout_updating_done();
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert('Sorry, there was an error with your request');
}
});
}, 500);
return false;
});
$( document ).on( 'change', 'select[name="billing_country"]', function(){
sunshine_checkout_updating();
var sunshine_selected_billing_country = $( this ).val();
var sunshine_selected_billing_country_required;
if ( $( this ).prop( 'required' ) ) {
sunshine_selected_billing_country_required = true;
}
setTimeout( function () {
$.ajax({
type: 'POST',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: {
action: 'sunshine_checkout_update_state',
country: sunshine_selected_billing_country,
type: 'billing',
required: sunshine_selected_billing_country_required,
security: sunshine_state_change_security
},
success: function(output, textStatus, XMLHttpRequest) {
if ( output ) {
$( '#sunshine--checkout--payment div[id*="billing_"]' ).remove();
//$( '#sunshine-checkout-payment .sunshine--form--fields' ).append( output );
$( output ).insertAfter( '#sunshine--checkout--field--different_billing' );
//sunshine_mark_filled();
}
sunshine_checkout_updating_done();
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert('Sorry, there was an error with your request');
}
});
}, 500);
return false;
});
$( document ).on( 'submit', '#sunshine--checkout--discount-form', function(e){
e.preventDefault();
$( '#sunshine--checkout--discount-form--error' ).remove();
$( '#sunshine--checkout--discount-form' ).removeClass( 'error' );
var sunshine_discount_code = $( 'input[name="discount"]' ).val();
if ( ! sunshine_discount_code ) {
return false;
}
sunshine_checkout_updating();
$.ajax({
type: 'POST',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: {
action: 'sunshine_checkout_discount_code',
discount_code: sunshine_discount_code,
security: "77e25dac17"
},
success: function( result, textStatus, XMLHttpRequest ) {
if ( result.success ) {
sunshine_reload_checkout();
} else {
$( '#sunshine--checkout--discount-form' ).addClass( 'error' ).after( '<div id="sunshine--checkout--discount-form--error">' + result.data.message + '</div>' );
}
sunshine_checkout_updating_done();
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert( 'Sorry, there was an error with your request' );
sunshine_checkout_updating_done();
}
});
});
$( document ).on( 'click', '.sunshine--checkout--discount-applied button', function(){
var sunshine_discount_code = $( this ).data( 'id' );
if ( !sunshine_discount_code ) {
return false;
}
sunshine_checkout_updating();
$.ajax({
type: 'POST',
url: 'https://dissident7.com/wp-admin/admin-ajax.php',
data: {
action: 'sunshine_checkout_discount_code_delete',
discount_code: sunshine_discount_code,
security: "31b3d2d59f"
},
success: function( result, textStatus, XMLHttpRequest ) {
if ( result.success ) {
sunshine_reload_checkout();
}
sunshine_checkout_updating_done();
},
error: function(MLHttpRequest, textStatus, errorThrown) {
alert( 'Sorry, there was an error with your request' );
sunshine_checkout_updating_done();
}
});
});
// Field conditions
function sunshine_get_condition_field_value( field_id ) {
var field = $( '#sunshine--form--field--' + field_id );
var field_type = field.data( 'type' );
var value;
if ( field_type == 'text' || field_type == 'email' || field_type == 'tel' || field_type == 'password' ) { // Text input box
value = $( 'input', field ).val();
} else if ( field_type == 'checkbox' ) {
value = $( 'input:checked', field ).val();
if ( typeof value === 'undefined' ) {
value = 'no';
}
} else if ( field_type == 'radio' ) {
value = $( 'input:checked', field ).val();
if ( typeof value === 'undefined' ) {
value = 0;
}
} else if ( field_type == 'select' ) {
value = $( 'select option:selected', field ).val();
}
return value;
}
function sunshine_set_field_disabled() {
$( '.sunshine--form--field' ).each(function(){
if ( $( this ).is( ':visible' ) ) {
$( 'input, select, textarea', this ).prop( 'disabled', false );
} else {
$( 'input, select, textarea', this ).prop( 'disabled', true );
}
});
}
/* Credit card input formatting */
$( document ).on( 'keyup', 'input.sunshine--credit-card--number', function() {
$( this ).val( function (index, value) {
value = value.replace(/\W/gi, '');
// Determine card type and change max CVV maxlength to 3 for non-AMEX
if ( value.substring(0,2) == '34' || value.substring(0,2) == '37' ) {
$( this ).attr( 'maxlength', 17 );
$( '.sunshine--credit-card--cvc' ).attr( 'maxlength', 4 );
if ( value.length >= 10 ) {
value = value.substring(0,4) + ' ' + value.substring(4,10) + ' ' + value.substring(10);
} else if ( value.length >= 4 ) {
value = value.substring(0,4) + ' ' + value.substring(4);
}
value = value.substring(0,17);
} else {
$( this ).attr( 'maxlength', 19 );
$( '.sunshine--credit-card--cvc' ).attr( 'maxlength', 3 );
value = value.replace(/(.{4})/g, '$1 ');
value = value.substring(0,19);
}
return value;
});
});
$( document ).on( 'keyup', 'input.sunshine--credit-card--expiration', function(e) {
if ( e.keyCode != 8 ) {
$( this ).val( function ( index, value ) {
let first_digit = value.substring( 0, 1 );
if ( first_digit > 1 && first_digit < 10 ) {
let rest = value.substring( 1 );
value = '0' + first_digit + '/' + rest;
}
if ( value.length == 2 ) {
value += '/';
}
console.log( 'exdate: ' + value );
return value;
});
}
});
});
ai_front = {"insertion_before":"BEFORE","insertion_after":"AFTER","insertion_prepend":"PREPEND CONTENT","insertion_append":"APPEND CONTENT","insertion_replace_content":"REPLACE CONTENT","insertion_replace_element":"REPLACE ELEMENT","visible":"VISIBLE","hidden":"HIDDEN","fallback":"FALLBACK","automatically_placed":"Automatically placed by AdSense Auto ads code","cancel":"Cancel","use":"Use","add":"Add","parent":"Parent","cancel_element_selection":"Cancel element selection","select_parent_element":"Select parent element","css_selector":"CSS selector","use_current_selector":"Use current selector","element":"ELEMENT","path":"PATH","selector":"SELECTOR"};