]>
git.ipfire.org Git - ipfire.org.git/blob - src/static/js/script.min.js
1 function getCookie(o
){var t
=document
.cookie
.match("\\b"+o
+"=([^;]*)\\b");return t
?t
[1]:void 0}$(window
).scroll(function(){$(".navbar").offset().top
>50?$(".navbar-fixed-top").addClass("top-nav-collapse"):$(".navbar-fixed-top").removeClass("top-nav-collapse")}),$(function(){$(".page-scroll a, a.page-scroll").bind("click",function(o
){var t
=$(this);$("html, body").stop().animate({scrollTop
:$(t
.attr("href")).offset().top
},1500,"easeInOutExpo"),o
.preventDefault()})}),$.query=function(o
){return new RegExp("[\\?&]"+o
+"=([^&#]*)").exec(window
.location
.href
)[1]||0},$("a.download-splash").click(function(o
){o
.preventDefault(),linkLocation
=this.href
,window
.location
="http://downloads.ipfire.org/download-splash?file="+linkLocation
});var $window
=$(window
);$(".sidenav").affix({offset
:{top:function(){return $window
.width()<=980?290:240},bottom
:270}}),/.*download-splash.*/i.test(window
.location
.href
)&&$("p.download-path").ready(function(){var o
=!1,t
=["http://downloads.ipfire.org/"],e
=$.query("file");for(i
in t
)prefix
=t
[i
],e
.substring(0,prefix
.length
)==prefix
&&(o
=!0);o
&&($("p.download-path").prepend($("<a>",{href
:encodeURI(e
),text
:e
})),setTimeout(function(){window
.location
=e
},"2000"))}),jQuery
.postJSON=function(url
,args
,callback
){args
._xsrf
=getCookie("_xsrf"),$.ajax({url
:url
,data
:$.param(args
),dataType
:"text",type
:"POST",success:function(response
){callback(eval("("+response
+")"))}})};