From fe4c6c7d2907a79118d836e72c0442d666091524 Mon Sep 17 00:00:00 2001 From: Alexander Biehl Date: Fri, 1 Sep 2017 13:03:49 +0200 Subject: Make trigger link configurable (#678) QuickNav: Configurable show/hide trigger --- haddock-api/resources/html/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'haddock-api/resources/html') 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); } } -- cgit v1.2.3