diff --git a/js/iframe_true.js b/js/iframe_true.js index 6e4ba486a1f0e8b486dea0626a3bebc33a839dfb..97860954a68198a0564c1bfddc190d354a7dade5 100644 --- a/js/iframe_true.js +++ b/js/iframe_true.js @@ -11,20 +11,24 @@ */ ;(function () { - var to_hide = [ + window.onload = function () { + var to_hide = [ "#page-header", "#page-wrapper > nav", - "#page-footer" - ]; - for (var i = 0; i < to_hide.length; i++) { - document.querySelector(to_hide[i]).setAttribute('class', 'none-hidden'); + "#page-footer", + "#nav-drawer" + ]; + for (var i = 0; i < to_hide.length; i++) { + document.querySelector(to_hide[i]).setAttribute('class', 'none-hidden'); + } + document.querySelector('#page').setAttribute('class', ''); + document.querySelector('#page').style.margin = 0; + document.querySelector('#page-wrapper').setAttribute('class', 'no-after'); + document.querySelector('#page-content').setAttribute('class', 'no-margin-l-r'); + document.querySelector('#region-main-box').style.padding = 0; + document.querySelector('#region-main>.card').style.minHeight = 0; + document.body.style.marginLeft = 0; } - document.querySelector('#page').setAttribute('class', ''); - document.querySelector('#page').style.margin = 0; - document.querySelector('#page-wrapper').setAttribute('class', 'no-after'); - document.querySelector('#page-content').setAttribute('class', 'no-margin-l-r'); - document.querySelector('#region-main-box').style.padding = 0; - document.querySelector('#region-main>.card').style.minHeight = 0; })() // var elmt = document.getElementById("page-header");