PageSourceSearch

https://turk3.org/js/tabs-updater.min.js

js turk3.org collected 2026-09-29 21:36:52 UTC 1,917 bytes, 8 lines download raw bytes

1define(['jquery','Magento_Ui/js/modal/modal'],function($){'use strict';$.widget('swissup.tabsUpdater',{component:'Swissup_Easytabs/js/tabs-updater',options:{aliases:[],url:'',swatchOptionsSelector:'.product-options-wrapper [data-role=swatch-options]',configurableOptionsSelector:'#product_addtocart_form .field.configurable'},_update:function(productId){const me=this;me.options.aliases.forEach((alias)=>{const $tabTitle=$(document.getElementById(`tab-label-${alias}-title`));const $tabItemTitle=$tabTitle.closest('.item.title');var url=me.options.url.replace('/tab_alias/',`/${alias}/`);if(productId)
2url=url.replace('/id/','/parent_id/')+`id/${productId}/`;$tabTitle.attr('data-ajaxurl',url);$tabItemTitle.attr('data-loaded',false);if($tabItemTitle.hasClass('active'))
3me._activateTab(alias);});},_create:function(){const me=this;me._super();$(me.options.swatchOptionsSelector).on('change.tabsupdater',(event)=>{const $swatches=$(event.currentTarget);const swatchRenderer=$swatches.data('mageSwatchRenderer')||$swatches.data('mage-SwatchRenderer');if(swatchRenderer)
4me._update(swatchRenderer.getProduct());});$(me.options.configurableOptionsSelector).on('change.tabsupdater',(event)=>{const $productForm=$('#product_addtocart_form');const configurable=$productForm.data('mageConfigurable');if(configurable)
5me._update(configurable.simpleProduct);});},_activateTab:function(alias){const $tabs=$(this.element);var tabsWidget=$tabs.data('swissupTabs');if(!tabsWidget)
6tabsWidget=$tabs.tabs('instance');$tabs.find('[data-role="content"]').each((index,content)=>{if($(content).attr('id')===alias){if(typeof tabsWidget.activate==='function')
7tabsWidget.activate(index);else
8tabsWidget.collapsibles.eq(index).collapsible('open');}});},_destroy:function(){$(me.options.swatchOptionsSelector).off('change.tabsupdater');$(me.options.configurableOptionsSelector).off('change.tabsupdater');}});return $.swissup.tabsUpdater;});

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.