/** * DO NOT EDIT THIS FILE! This script is for the WordPress admin area only. * * Information on customising Auction Nudge can be found here: * https://www.auctionnudge.com/customize/behaviour * */ function setup_parameter_groups() { jQuery('.an-parameter-group:not(.an-parameter-group-feed) .an-parameter-group-content').hide(); jQuery('.an-parameter-group legend').each(function() { var legend_text = jQuery(this).text(); if(legend_text.indexOf('[+]') == -1) { jQuery(this).text(legend_text + ' [+]'); } }); jQuery('.an-parameter-group legend').click(function() { if(! jQuery('.an-parameter-group-content', jQuery(this).parent('.an-parameter-group')).is(':visible')) { //Hide all jQuery('.an-parameter-group-content', jQuery(this).parents('.an-custom-field-tab')).slideUp(); jQuery('.an-parameter-group-content', jQuery(this).parents('.an-widget-container')).slideUp(); //Show this jQuery('.an-parameter-group-content', jQuery(this).parent('.an-parameter-group')).slideDown(); } }); } function an_show_theme_options(theme, context) { //Carousel options jQuery('#carousel_scroll-container', context).hide(); jQuery('#carousel_width-container', context).hide(); jQuery('#carousel_auto-container', context).hide(); //Grid options jQuery('#grid_width-container', context).hide(); jQuery('#grid_cols-container', context).hide(); //Common options jQuery('#cats_output-container', context).hide(); jQuery('#page-container', context).hide(); jQuery('#img_size-container', context).hide(); jQuery('#show_logo-container', context).hide(); switch(theme) { case 'carousel' : jQuery('#carousel_scroll-container', context).show(); jQuery('#carousel_width-container', context).show(); jQuery('#carousel_auto-container', context).show(); break; case 'grid' : jQuery('#page-container', context).show(); jQuery('#grid_width-container', context).show(); jQuery('#grid_cols-container', context).show(); jQuery('#cats_output-container', context).show(); jQuery('#img_size-container', context).show(); jQuery('#show_logo-container', context).show(); break; default: jQuery('#page-container', context).show(); jQuery('#cats_output-container', context).show(); jQuery('#img_size-container', context).show(); jQuery('#show_logo-container', context).show(); break; } } function setup_widget_theme_dropdown() { jQuery('.an-widget-container select').each(function() { if(jQuery(this).attr('id') == 'theme') { var widget_parent = jQuery(this).parents('.widget'); an_show_theme_options(jQuery(this).val(), widget_parent); jQuery(this).change(function() { an_show_theme_options(jQuery(this).val(), widget_parent); }); } }); } function adblock_check() { if(jQuery('#adblock-test').is(":hidden")) { var message = '
Ad Blocker Detected! It looks like you are using an plugin to block content from the page, this may prevent Auction Nudge from loading (more info)