Skip to content

Commit 81fcdaf

Browse files
committed
Update fwDNK.js
1 parent 11851f1 commit 81fcdaf

File tree

1 file changed

+0
-59
lines changed

1 file changed

+0
-59
lines changed

fwDNK.js

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -612,17 +612,13 @@ fwDNK.prototype = {
612612
};
613613
},
614614
};
615-
616615
/*
617616
*
618617
*
619618
*
620619
*
621620
*
622621
*
623-
*
624-
*
625-
*
626622
*/
627623
function cb(){};
628624
HTMLElement.prototype.dialogClose = function(){dnk(this.parentNode.parentNode).dialogClose();};
@@ -634,59 +630,4 @@ HTMLElement.prototype.isVisible = function(){
634630
var visibleBottom = visibleTop + document.documentElement.offsetHeight;
635631
return ((posBottom >= visibleTop) && (posTop <= visibleBottom));
636632
};
637-
function scrollY() {if( window.pageYOffset ) { return window.pageYOffset; } return Math.max(document.documentElement.scrollTop, document.body.scrollTop);}
638-
window.onscroll=function(){
639-
var li=document.querySelector("header li");
640-
var img=li.parentNode.parentNode.parentNode.querySelector("#logo");
641-
if(!img.isVisible() && img.clientWidth>45){
642-
li.parentNode.style.marginTop=scrollY()+"px";
643-
li.parentNode.style.color="transparent";
644-
li.parentNode.style.fontSize="0px";
645-
li.parentNode.className="small";
646-
}else{
647-
li.parentNode.style.marginTop="0px";
648-
li.parentNode.style.color="inherit";
649-
li.parentNode.style.fontSize="inherit";
650-
li.parentNode.className="large";
651-
};
652-
if(img.clientWidth>45){
653-
li.parentNode.parentNode.parentNode.style.marginLeft="0px";
654-
}
655-
};
656-
window.onresize=function(){setTimeout("window.onscroll()",250);};
657633
$=function (p){return new fwDNK(p,cb);};
658-
659-
function addLinksOnNav(){
660-
li=document.querySelectorAll("header nav ul li");
661-
for (var i=0; i < li.length; i++) {
662-
li[i].onclick=function(){
663-
var t=this.innerHTML;
664-
t=t.replace(/ /g, '_');
665-
window.location = window.location.href.split("#")[0]+"#"+t;
666-
//nav();
667-
};
668-
};
669-
}
670-
671-
function nav(){
672-
clearInterval(window['interval']);
673-
var page=window.location.hash==""?"#"+document.querySelector("nav ul li").innerHTML:window.location.hash;
674-
var p=page.replace(/_/g, ' ');
675-
li=document.querySelectorAll("nav ul li");
676-
for (var i=0; i < li.length; i++) {li[i].innerHTML==p.split("#")[1]?li[i].className='selected':li[i].className='';};
677-
page=page.toLowerCase().replace(/#/g, 'pages/')+".html";
678-
$(document).loadHTMLfile(page,function(html){
679-
section.innerHTML=html;
680-
eval(section.querySelector("script").innerHTML);
681-
if(document.querySelector("header").clientWidth==210){setTimeout("dnkTemplateMenu.onclick()",500);}
682-
});
683-
}
684-
685-
var oldhref=window.location.href;
686-
setInterval(function(){if(window.location.href!=oldhref){oldhref=window.location.href;nav();}},200);
687-
window.addEventListener('load', function(){
688-
this["section"]=document.getElementsByTagName("section")[0];
689-
this['dnkTemplateMenu']=document.body.querySelector("header img");dnkTemplateMenu.onclick=function(){var t=this.parentNode;t.style.marginLeft=="-210px"?t.style.marginLeft="0px":t.style.marginLeft="-210px";};
690-
nav();
691-
addLinksOnNav();
692-
});

0 commit comments

Comments
 (0)