diff options
Diffstat (limited to 'haddock-api/resources/html')
-rw-r--r-- | haddock-api/resources/html/index.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/haddock-api/resources/html/index.js b/haddock-api/resources/html/index.js index da30c434..0c2a3c83 100644 --- a/haddock-api/resources/html/index.js +++ b/haddock-api/resources/html/index.js @@ -1,6 +1,7 @@ quickNav = (function() { var baseUrl; +var showHideTrigger; // alias preact's hyperscript reviver since it's referenced a lot: var h = preact.h; @@ -195,7 +196,7 @@ var App = createClass({ }, componentDidMount: function() { - addSearchPageMenuButton(this.toggleVisibility.bind(this)); + showHideTrigger(this.toggleVisibility.bind(this)); }, render: function(props, state) { @@ -384,8 +385,9 @@ var NoResultsMsg = function(props) { }; return { - init: function(docBaseUrl) { + init: function(docBaseUrl, showHide) { baseUrl = docBaseUrl || "."; + showHideTrigger = showHide || addSearchPageMenuButton preact.render(h(App), document.body); } } |