1(function($) { 2 $(window).on('override_nplModal_methods', function(e, methods) { 3 methods.add_pre_open_callback(function(link, params) { 4 // Cart icon click, or thumbnail open when "display cart initially" is enabled. 5 var showOnIconClick = $(link).data('nplmodal-show-cart'); 6 var showCartInitially = $.nplModal('get_setting', 'display_cart', false); 7 var showCommentsInitially = $.nplModal('get_setting', 'display_comments', false); 8 var galleryId = params && params.gallery_id; 9 var isEcommerceEnabled = galleryId && $.nplModal('get_displayed_gallery_setting', galleryId, 'is_ecommerce_enabled', false); 10 11 if ((showOnIconClick || (showCartInitially && !showCommentsInitially)) && isEcommerceEnabled) { 12 params.show_sidebar = '/cart'; 13 } 14 return params; 15 }); 16 }); 17})(jQuery);
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.