ASDSO Dam Safety Toolbox

Template: WhatLinksHere: Difference between revisions

From ASDSO Dam Safety Toolbox
Jump to: navigation, search
(Undo revision 6974 by Lkeby (talk))
Tag: Undo
No edit summary
Line 7: Line 7:
----
----
<html>
<html>
  <iframe id="iframe"
<iframe id="iframeWin"
          src="/wiki/Special:WhatLinksHere/</html>{{PAGENAME}}<html>"
        src="/wiki/Special:WhatLinksHere/</html>{{PAGENAME}}<html>"
          style="border:none;width:100%;display:none;"
        style="border:none;height:500px;width:100%;display:none;
          title="What Links Here">
        scrolling="no"  
  </iframe>
        title="What Links Here"></iframe>


  <script type="application/javascript">
<script>
    document.querySelector("iframe").addEventListener( "load", function(e) {
document.querySelector("iframe").addEventListener( "load", function(e) {
      var iframeWin = document.getElementById("iframeWin");
  var iframeWin = document.getElementById("iframeWin");
      // Set height
  var content = (iframeWin.contentWindow || iframeWin.contentDocument);
      iframeWin.height = iframeWin.contentWindow.document.body.scrollHeight;
  if (content.document)content = content.document;
      var content = (iframeWin.contentWindow || iframeWin.contentDocument);
  // Adjust padding/margin
      if (content.document)content = content.document;
  iframeWin.contentWindow.document.getElementById('maincontentwrapper').style.marginLeft = "0px";
      // Adjust padding/margin
  iframeWin.contentWindow.document.getElementById('maincontentwrapper').style.paddingLeft = "0px";
      iframeWin.contentWindow.document.getElementById('maincontentwrapper').style.marginLeft = "0px";
  // Hide header, heading, back link & footer
      iframeWin.contentWindow.document.getElementById('maincontentwrapper').style.paddingLeft = "0px";
  content.body.getElementsByTagName("header")[0].style.display = "none";
      // Hide header, heading, back link & footer
  content.body.getElementsByClassName("firstHeading")[0].style.display = "none";
      content.body.getElementsByTagName("header")[0].style.display = "none";
  iframeWin.contentWindow.document.getElementById('contentSub').style.display = "none";
      content.body.getElementsByClassName("firstHeading")[0].style.display = "none";
  content.body.getElementsByTagName("footer")[0].style.display = "none";
      iframeWin.contentWindow.document.getElementById('contentSub').style.display = "none";
  // Show iframe
      content.body.getElementsByTagName("footer")[0].style.display = "none";
  iframeWin.style.display="block";
      // Show iframe
});
      iframeWin.style.display="block";
</script>
    });
  </script>
</html>
</html>

Revision as of 15:54, 7 July 2023

Usage