efef

Password security

I am using Java Script to determin if a localStorage variable has the right value. If not, the current site is replaced by the site to enter the password. If the correct password has been entered, the localStorage variable gets updated. From this point forward, all Pages can be used until the browser is closed. This systeme is, of course, not very safe but it still works in the majority of cases.

Menu bar

In order to be able to change the content of the page but still use the same menu bar on every subpage, Im using an iframe. Clicking on links in the menu bar targets the iframe and only changes the content of the iframe.

Resize iframe

Because I want to use a sticky menu bar on the main page, the ifame should not have a scrollbar, instead the parent page of the iframe should have it. Therefore Im using Java Script to resize the iframe in an onload function. Unfortunatly, this doesnt work with videos, because they change their size after the onload fires. In theory, this problem is quit easy to solve, but Chrome is just a bit anoying. To tackle this problem, I tried onreadreadystatechange, wich also doesnt work with Chrome. Then .addEventListener("DOMContentLoaded", bla, false);. Then video.onloadeddata(), wich means the video is definitly loaded. In the end, I accepted that it doesnt matter at wich point I resize the iframe, the video will still change its size after the resize. Then I just changed the video height from auto to a fixed value, wich looks very bad and I dont like it. Because the resize function doesnt work on my local machine (cross-origin error) and I have to upload my code every time before I can test it (wich takes several minutes), I decided to not waste any more time on this. All of that doesnt make any sense, but I wanted to try it anyway.