Skip to content
Snippets Groups Projects
Commit 93c49f7c authored by Tim Repke's avatar Tim Repke
Browse files

added a small hack to prevent the page from scrolling whilst scrolling in the logs

parent 242cc472
No related branches found
No related tags found
No related merge requests found
......@@ -35,21 +35,21 @@
</head>
<body>
<div class="shadowbox">
<div id="headerbox">
<div class="headerboxshade"><h1>Fachschaftsfahrt</h1></div>
<div class="headerboxshade"><h2>Informatik</h2></div>
<p></p>
</div>
<div id="menubox">
<div id="headerbox">
<div class="headerboxshade"><h1>Fachschaftsfahrt</h1></div>
<div class="headerboxshade"><h2>Informatik</h2></div>
<p></p>
</div>
<div id="menubox">
<?php
show_content();
?>
<?php
show_content();
?>
</div>
<div id="footerbox">&copy;<?php echo date("Y"); ?> Fachschaftsinitiative Informatik der Humboldt Universität zu Berlin.</div>
<img src="view/graphics/studityp_5.gif" style="position: fixed;bottom: 5px;left:0px" />
</div>
<div id="footerbox">&copy;<?php echo date("Y"); ?> Fachschaftsinitiative Informatik der Humboldt Universität zu Berlin.</div>
<img src="view/graphics/studityp_5.gif" style="position: fixed;bottom: 5px;left:0px" />
</div>
</body>
......
......@@ -82,6 +82,23 @@ class Game1SignupMethod extends SignupMethod {
});
game.run();
// this following stuff is to prevent the page from scrolling, when the user
// actually just wants to scroll inside the logs.
// it removes the main scrollbar and adds a padding of its size to replace the space
window.onload = function() {
var scrollbarWidth = window.innerWidth - document.documentElement.clientWidth;
var x = document.getElementsByClassName("sidebar-log");
for (var i = 0; i < x.length; i++) {
x[i].addEventListener("mouseout", function(){
document.body.style.overflow=\'auto\';
document.body.style.paddingRight = "0px";
}, false);
x[i].addEventListener("mouseover", function(){
document.body.style.overflow=\'hidden\';
document.body.style.paddingRight = scrollbarWidth+"px";
}, false);
}
};
</script>';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment