Slight simplification of class injection for iframed app pages

This commit is contained in:
str4d
2012-07-05 13:04:45 +00:00
parent ec80501977
commit 319d217dc1
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@
html = f.contentWindow.document.documentElement;
f.style.height = body.scrollHeight + "px";
}
function injectClass(f) { f.contentWindow.document.getElementsByTagName('body')[0].setAttribute('class', 'iframed'); }
function injectClass(f) { f.contentWindow.document.body.setAttribute('class', 'iframed'); }
function setupFrame() {
f = document.getElementById("i2ptunnelframe");
resizeFrame(f);

View File

@@ -22,7 +22,7 @@
function requestAjax1() { ajax("/xhr1.jsp?requestURI=<%=request.getRequestURI()%>", "xhr", <%=intl.getRefresh()%>000); }
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
function resizeFrame(f) { f.style.height = f.contentWindow.document.body.scrollHeight + "px"; }
function injectClass(f) { f.contentWindow.document.getElementsByTagName('body')[0].setAttribute('class', 'iframed'); }
function injectClass(f) { f.contentWindow.document.body.setAttribute('class', 'iframed'); }
function setupFrame() {
f = document.getElementById("i2psnarkframe");
resizeFrame(f);