-
Notifications
You must be signed in to change notification settings - Fork 0
/
only.min.js
1 lines (1 loc) · 10.7 KB
/
only.min.js
1
!function(a){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),function(a){if(!a.fn.style){var b=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},c=!!CSSStyleDeclaration.prototype.getPropertyValue;c||(CSSStyleDeclaration.prototype.getPropertyValue=function(a){return this.getAttribute(a)},CSSStyleDeclaration.prototype.setProperty=function(a,c,d){this.setAttribute(a,c);var d="undefined"!=typeof d?d:"";if(""!=d){var e=new RegExp(b(a)+"\\s*:\\s*"+b(c)+"(\\s*;)?","gmi");this.cssText=this.cssText.replace(e,a+": "+c+" !"+d+";")}},CSSStyleDeclaration.prototype.removeProperty=function(a){return this.removeAttribute(a)},CSSStyleDeclaration.prototype.getPropertyPriority=function(a){var c=new RegExp(b(a)+"\\s*:\\s*[^\\s]*\\s*!important(\\s*;)?","gmi");return c.test(this.cssText)?"important":""}),a.fn.cssImportant=function(a){var b=this.get(0);if(priority="","undefined"==typeof b)return this;var c=this.get(0).style;for(styleName in a)return value=a[styleName],value.match(/!important/i)&&(priority="important",value=value.replace("!important","")),"undefined"!=typeof styleName?"undefined"!=typeof value?(priority="undefined"!=typeof priority?priority:"",c.setProperty(styleName,value,priority),this):c.getPropertyValue(styleName):c}}}(jQuery),Array.prototype.subarray=function(a,b){return b||(b=-1),b<0?this.slice(a,this.length+1-b*-1):this.slice(a,b)},Array.prototype.clone=function(){return this.slice(0)},$(function(){function prefixe_tlt(a){return prefixe_tlt_v+"_"+a.join("_")}function prefixe_tlf(a){return prefixe_tlf_v+"_"+a.join("_")}function reload(){tab_n=[],tab_n_obj=[],lg_size=1200,md_size=992,sm_size=768,tab_second_aut=["lg","md","sm","xs","mob"],tab_second_aut_custom=["lg","md","sm"],tab_third_aut_aut=["css","class","js"],tab_first=["only","nonly"],tab_is={mob:function(){return jQuery.browser.mobile},lg:function(){return in_ge(w_width(),lg_size)},md:function(){return in_lt_ge(w_width(),lg_size,md_size)},sm:function(){return in_lt_ge(w_width(),md_size,sm_size)},xs:function(){return in_lt(w_width(),sm_size)}},begin()}function inArray(a,b){return $.inArray(a,b)!=-1}function prep_custom(a){jQuery("*").each(function(b,c){$t=$(this),arr2=[],arr3=[],jQuery.each(this.attributes,function(){this.name.match(a())&&(d2=this.name.split("-"),"custom"==d2[1]&&(2==d2.length?custom_arr(this.value):3==d2.length&&custom(d2[2],this.value)))})}),m=function(){return new RegExp(regex(),"i")},m3=function(){return new RegExp(regex3(),"i")}}function prep_custom_second(a){jQuery("*").each(function(b,c){$t=$(this),arr2=[],arr3=[],jQuery.each(this.attributes,function(){this.name.match(a())&&(d2=this.name.split("-"),2==d2.length&&inArray(d2[1],tab_second_aut_custom)&&custom_second(ds[1],this.value))})}),m=function(){return new RegExp(regex(),"i")},m3=function(){return new RegExp(regex3(),"i")}}function prep(a,b,c){return arr=[],prep_custom(b),prep_custom_second(c),jQuery("*").each(function(b,c){$t=$(this),arr2=[],arr3=[],jQuery.each(this.attributes,function(){if(this.name.match(a())){sd=this.name.split("-"),sd2=sd[1].split("_");arr2.push({name:this.name,value:this.value})}}),arr2.length>0&&arr.push([$t,arr2])}),$(arr)}function in_ge(a,b){return a>=b}function in_lt(a,b){return a<b}function and(a,b){return a&&b}function in_lt_ge(a,b,c){return and(in_lt(a,b),in_ge(a,c))}function to_String(a){return"'"+a+"'"}function func(name){return eval(name+"()")}function func_p(name,p){return eval(name+"("+p.join(",")+")")}function clone(a){return $.extend(!0,{},a)}function only_keys(a){f={};for(i in a)f[i]="";return f}function to_is(a){sd=a.split("_");for(var b=0;b<sd.length;b++)if(1==tab_is[sd[b]]())return!0;return!1}function tab_loop_third_css(a,b,c){c?b.cssImportant(a):b.cssImportant(only_keys(a))}function tab_loop_third_class(a,b,c){b=$(tab_n_obj[b]);for(var d=0;d<a.length;d++)c?b.hasClass(a[d])||b.addClass(a[d]):b.removeClass(a[d])}function tab_loop_third_js(d,obj,k){obj=$(tab_n_obj[obj]);for(var i=0;i<d.length;i++)k&&eval(d[i])}function tab_loop_third(a,b,c,e){for(y in tab_n[a][b][c])if(!test_third(b,c,y)){d=tab_n[a][b][c][y],d2=d.clone();for(var f=0;f<d.length;f++)d2[f]="'"+String(d[f]).trim()+"'";prefi=tab_name[y],vars=["["+d2.join(",")+"]",a,e],func_p(prefi,vars)}}function tab_loop_first_only(a,b,c,d){k=d,tab_loop_third(a,b,c,k)}function tab_loop_first_nonly(a,b,c,d){k=!d,tab_loop_third(a,b,c,k)}function re(){for(var a=0;a<tab_n.length;a++)for(u in tab_n[a])if(inArray(u,tab_first))for(x in tab_n[a][u])test_second(u,x)||(dd=to_is(x),prefi=tab_name[u],vars=[a,to_String(u),to_String(x),dd],func_p(prefi,vars))}function custom(third,val){ino="",min=!1,min_val=0,max=!1,max_val=0,f="",df=val.split(",");for(var i=0;i<df.length;i++)du=df[i].split(":"),"min"==du[0]?(min=!0,min_val=du[1]):"max"==du[0]&&(max=!0,max_val=du[1]);min&&!max?f="function(){ return in_ge(w_width(),"+min_val+");}":min&&max?f="function(){ return in_lt_ge(w_width(),"+max_val+","+min_val+");}":max&&!min&&(f="function(){ return in_lt(w_width(),"+max_val+");}"),eval("var func = "+f),tab_is[third]=func,tab_second_aut_custom.push(third),tab_second_aut.push(third),tab_third_aut[third]=tab_third_aut_aut}function custom_arr(d){a=d.split(";");for(var e=0;e<a.length;e++){b=a[e].split(","),v=!1;for(var f=0;f<b.length;f++)if(c=b[f].split(":"),"name"==c[0]){n=b,custom(c[1],b.subarray(1).join(",")),v=!0;break}}}function custom_second(n,v){eval(n+"="+v+";")}function test_second(a,b){if(second_multi=b.split("_"),second_multi.length>1){for(var c=0;c<second_multi.length;c++)if(!inArray(second_multi[c],tab_second()[a]))return!0}else if(!inArray(b,tab_second()[a]))return!0;return!1}function test_third(a,b,c){if(second_multi=b.split("_"),second_multi.length>1){for(var d=0;d<second_multi.length;d++)if(!inArray(second_multi[d],tab_second()[a]))return!0}else for(var e=0;e<second_multi.length;e++)if(!inArray(c,tab_third()[a][second_multi[e]]))return!0;return!1}function begin(){prep(m,m2,m3).each(function(a,b){tab_n_obj.push(b[0].get(0)),tab_n.push({});for(var c=0;c<b[1].length&&(l=b[1][c],ds=l.name.split("-"),dd=l.value,first=ds[0],second=ds[1],second_multi=second.split("_"),third=ds[2],inArray(first,tab_first))&&!test_second(first,second)&&!test_third(first,second,third);c++){first in tab_n[tab_n.length-1]||(tab_n[tab_n.length-1][first]={}),second in tab_n[tab_n.length-1][first]||(tab_n[tab_n.length-1][first][second]={}),third in tab_n[tab_n.length-1][first][second]||("array"==third_type[third]?tab_n[tab_n.length-1][first][second][third]=[]:"obj"==third_type[third]&&(tab_n[tab_n.length-1][first][second][third]={})),inter=inter_tab[third],sd=dd.split(inter);for(var d=0;d<sd.length;d++)i=sd[d],"css"==ds[2]?(ddz=i.split(":"),ss=ddz[0],sss=ddz[1],ss.length>0&&(tab_n[a][ds[0]][ds[1]][ds[2]][ss]=sss)):"cssi"==ds[2]?(ds[2]="css",ddz=i.split(":"),ss=ddz[0],sss=ddz[1],ss.length>0&&(tab_n[a][ds[0]][ds[1]][ds[2]][ss]=sss+" !important")):"class"==ds[2]?(sss=i,sss.length>0&&tab_n[a][ds[0]][ds[1]][ds[2]].push(sss)):"js"==ds[2]&&(sss=i,sss.length>0&&tab_n[a][ds[0]][ds[1]][ds[2]].push(sss))}}),re()}var tab_n=[],tab_n_obj=[],lg_size=1200,md_size=992,sm_size=768,tab_is={mob:function(){return jQuery.browser.mobile},lg:function(){return in_ge(w_width,lg_size)},md:function(){return in_lt_ge(w_width,lg_size,md_size)},sm:function(){return in_lt_ge(w_width,md_size,sm_size)},xs:function(){return in_lt(w_width,sm_size)}},tab_second_aut=["lg","md","sm","xs","mob"],tab_second_aut_custom=["lg","md","sm"],tab_third_aut_aut=["css","class","js"],tab_first=["only","nonly"],regex_second_pre=function(){return tab_second_aut.join("|")},regex_first_pre=tab_first.join("|"),regex_third_pre=tab_third_aut_aut.join("|"),regex_first="("+regex_first_pre+")",regex_second=function(){return"("+regex_second_pre()+")|((("+regex_second_pre()+")_)+("+regex_second_pre()+"))"},regex_third="("+regex_third_pre+")",regex=function(){return"^"+regex_first+"-"+regex_second()+"-"+regex_third+"$"},regex2="^only-custom(-[^-]+)?$",regex3=function(){return"^only-("+tab_second_aut_custom.join("|")+")$"},m=function(){return new RegExp(regex(),"i")},m2=function(){return new RegExp(regex2,"i")},m3=function(){return new RegExp(regex3(),"i")},prefixe_tl="tab_loop",prefixe_tlt_v=prefixe_tl+"_third",prefixe_tlf_v=prefixe_tl+"_first",tab_third_aut={lg:tab_third_aut_aut,md:tab_third_aut_aut,sm:tab_third_aut_aut,xs:tab_third_aut_aut,mob:tab_third_aut_aut},tab_second=function(){return{only:tab_second_aut,nonly:tab_second_aut}},tab_third=function(){return{only:tab_third_aut,nonly:tab_third_aut}},tab_name={only:prefixe_tlf(["only"]),nonly:prefixe_tlf(["nonly"]),css:prefixe_tlt(["css"]),class:prefixe_tlt(["class"]),js:prefixe_tlt(["js"])},w_width=function(){return $(window).width()};this.OnlyJs=function(){this.reload()},OnlyJs.prototype.reload=function(){reload(this)},$(window).resize(function(){re()});var inter_tab={css:";",class:" ",cssi:";",js:";"},third_type={css:"obj",cssi:"obj",class:"array",js:"array"}}());var MyOnlyJs=new OnlyJs;