Commit c2bc76b3 authored by Vadim Makeev's avatar Vadim Makeev

default frame size

parent 3920e599
...@@ -35,11 +35,14 @@ ...@@ -35,11 +35,14 @@
</style> </style>
<script> <script>
function update() { function update() {
var url = document.location.hash.substr(1).split('x'), var url = document.location,
hash = url.hash.substr(1).split('x');
frame = document.querySelector('iframe'); frame = document.querySelector('iframe');
if(url.length == 2) { if(hash.length == 2) {
frame.style.width = url[0] + 'px'; frame.style.width = hash[0] + 'px';
frame.style.height = url[1] + 'px'; frame.style.height = hash[1] + 'px';
} else {
url.hash = '640x480';
} }
} }
function init() { function init() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment