diff options
author | Mark Lentczner <markl@glyphic.com> | 2010-08-13 22:17:48 +0000 |
---|---|---|
committer | Mark Lentczner <markl@glyphic.com> | 2010-08-13 22:17:48 +0000 |
commit | d7f6809cabbface09dc1b016591774b729413f00 (patch) | |
tree | b1ccf4d2cd5245f09736c13226c338906bc0900d /html | |
parent | e56b9cce24ac4895705576e282223f8811ed8eab (diff) |
move frames button to js
Diffstat (limited to 'html')
-rw-r--r-- | html/haddock-util.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/html/haddock-util.js b/html/haddock-util.js index d9b0b3e4..1a57b24b 100644 --- a/html/haddock-util.js +++ b/html/haddock-util.js @@ -164,6 +164,17 @@ function perform_search(full) } } +function addFramesButton() { + if (parent.location.href == window.location.href) { + var menu = document.getElementById("page-menu"); + if (menu) { + var btn = menu.lastChild.cloneNode(false); + btn.innerHTML = "<a href='#' onclick='reframe();return true;'>Frames</a>"; + menu.appendChild(btn); + } + } +} + function setSynopsis(filename) { if (parent.window.synopsis) { parent.window.synopsis.location = filename; @@ -171,10 +182,8 @@ function setSynopsis(filename) { } function reframe() { - if (parent.location.href == window.location.href) { - setCookie("haddock-reframe", document.URL); - window.location = "frames.html"; - } + setCookie("haddock-reframe", document.URL); + window.location = "frames.html"; } function postReframe() { |