PageSourceSearch

https://mabosplay-user.com/js/tabs.min.js

js mabosplay-user.com collected 2026-10-09 22:45:50 UTC 3,221 bytes, 17 lines download raw bytes

1(function(){'use strict';$.widget('tabs',{component:'tabs',options:{active:0,collapsible:false,collapsibleElement:'[data-role=collapsible]',header:'[data-role=title]',content:'[data-role=content]',trigger:'[data-role=trigger]'},create:function(){var self=this,activeIndex,expanded=true;this.collapsibles=this.element.find(this.options.collapsibleElement);this.headers=this.element.find(this.options.header);this.triggers=this.element.find(this.options.trigger);this.contents=this.element.find(this.options.content);if(this.headers.length===0){this.headers=this.collapsibles;}
2if(this.triggers.length===0){this.triggers=this.headers;}
3this.collapsibles.attr('role','presentation').parent().attr('role','tablist');this.triggers.attr('role','tab');activeIndex=this.findActiveTabIndex(location.hash);if(activeIndex>-1){this.options.active=activeIndex;}
4this.collapsibles.each(function(index,el){var isActive;if(_.isArray(self.options.active)){isActive=self.options.active.indexOf(index)!==-1;}else{isActive=index===self.options.active;}
5if(!isActive){expanded=false;}
6$(el).collapsible($.extend({},self.options,{active:isActive,header:self.headers.eq(index),content:self.contents.eq(index),trigger:self.triggers.eq(index)}));});if(expanded){this.triggers.attr('tabIndex',-1);this.collapsibles.removeAttr('data-collapsible',true);}
7$(this.element).on('collapsible:beforeOpen',function(event,data){var activeTab=self.getActiveTab(),prevContent;if(self.collapsibles.index(data.instance.element.get(0))===-1){return;}
8if(activeTab){prevContent=activeTab.collapsible('instance').content;}
9if(data.instance.options.multipleCollapsible){return;}
10self.prevHeight=prevContent?$(prevContent).outerHeight():false;self.collapsibles.not(data.instance.element).collapsible('close');if(!activeTab.isInViewport()){activeTab.get(0).scrollIntoView();}});$(this.element).on('collapsible:beforeLoad',function(event,data){if(self.prevHeight&&$(window).width()>767){data.instance.content.css('height',self.prevHeight);}});$(this.element).on('collapsible:afterLoad',function(event,data){data.instance.content.css('height','auto');});$(document).on('click.tabs','a[href*="#"]',function(event){var anchor=$(this).attr('href').split('#')[1],element,index;if(!anchor||self.element.has(this).length){return;}
11index=self.findActiveTabIndex('#'+anchor);if(index===-1){return;}
12event.preventDefault();self.collapsibles.eq(index).collapsible('open');element=self.contents.find('#'+anchor);if(!element.length){element=self.triggers.eq(index);}
13element.get(0).scrollIntoView();});},destroy:function(){$(document).off('click.tabs');this._super();},getActiveTab:function(){var tab;this.collapsibles.each(function(index,el){if($(el).collapsible('isActive')){tab=$(el);return false;}});return tab;},findActiveTabIndex:function(hash){var index=-1,activeTrigger,activeContent;if(!hash||hash.length<=1){return index;}
14activeTrigger=this.triggers.has('[href*="'+hash+'"');if(activeTrigger.length){index=this.triggers.index(activeTrigger);}else{try{activeContent=this.contents.has(hash);}catch(e){return-1;}
15if(!activeContent.length){activeContent=this.contents.filter(hash);}
16if(activeContent.length){index=this.contents.index(activeContent);}}
17return index;}});})();

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.