From af3588dd14fd02662b9e42d766615dd271d381c5 Mon Sep 17 00:00:00 2001 From: Mark Lentczner Date: Fri, 20 Aug 2010 01:37:55 +0000 Subject: better synopsis handling logic - no flashing --- html/haddock-util.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'html/haddock-util.js') diff --git a/html/haddock-util.js b/html/haddock-util.js index cd18aa81..8d43b996 100644 --- a/html/haddock-util.js +++ b/html/haddock-util.js @@ -212,15 +212,17 @@ function addMenuItem(html) { } function adjustForFrames() { + var bodyCls; + if (parent.location.href == window.location.href) { // not in frames, so add Frames button addMenuItem("Frames"); + bodyCls = "no-frame"; } else { - // in frames, remove synopsis - var syn = document.getElementById("synopsis"); - if (syn) { syn.parentNode.removeChild(syn); } + bodyCls = "in-frame"; } + addClass(document.body, bodyCls); } function reframe() { -- cgit v1.2.3