mirror of
https://github.com/waytotheweb/scripts.git
synced 2026-03-29 22:17:06 +00:00
GPL v3 Release
This commit is contained in:
31
csf/da/admin/index.html
Normal file
31
csf/da/admin/index.html
Normal file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
print "<iframe scrolling='auto' name='myiframe' id='myiframe' src='index.raw' frameborder='0' width='100%' onload='resizeIframe(this);'></iframe>\n";
|
||||
print "<script>\n";
|
||||
print "function setupObserver(iframe) {\n";
|
||||
print " const body = iframe.contentDocument.body;\n";
|
||||
print " const updateDimensions = () => {\n";
|
||||
print " iframe.style.height = iframe.contentDocument.body.offsetHeight + 'px';\n";
|
||||
print " };\n";
|
||||
print " const observer = new MutationObserver(updateDimensions);\n";
|
||||
print " observer.observe(body, {\n";
|
||||
print " attributes: true,\n";
|
||||
print " childList: true,\n";
|
||||
print " characterData: true,\n";
|
||||
print " subtree: true,\n";
|
||||
print " });\n";
|
||||
print "}\n";
|
||||
print "function resizeIframe(obj) {\n";
|
||||
print " if (!obj) return;\n";
|
||||
print " setupObserver(obj);\n";
|
||||
print " obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';\n";
|
||||
if ($ENV{SKIN_NAME} eq "enhanced") {
|
||||
print " obj.style.width = obj.contentWindow.document.body.scrollWidth + 'px';\n";
|
||||
} else {
|
||||
print " obj.style.width = '98vw';\n";
|
||||
}
|
||||
print " window.scrollTo(0,0);\n";
|
||||
print " window.parent.scrollTo(0,0);\n";
|
||||
print " window.parent.parent.scrollTo(0,0);\n";
|
||||
print "}\n";
|
||||
print "</script>\n";
|
||||
7
csf/da/admin/index.raw
Normal file
7
csf/da/admin/index.raw
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
$| = 1;
|
||||
|
||||
print "HTTP/1.1 200 OK\n";
|
||||
print "Content-type: text/html\r\n\r\n";
|
||||
system ("/usr/local/directadmin/plugins/csf/exec/csf");
|
||||
Reference in New Issue
Block a user