1if (jQuery.pjax) {
2        /* initialize pjax - tell it which div to replace ... */
3    jQuery(document).pjax('a', '#pjax_container');
4    /* we don't have a window.onload event / jQuery.ready event
5     * hence old plugins may needs some hacks to work. e.g. for
6     * the googlemap3 plugin ....
7    jQuery(document).on('pjax:start', function () { googleMapArray = new Array(); });
8    jQuery(document).on('pjax:success', function () {
9            if (googleMapArray.length) {
10                 init_googlemap3();
11            }
12    });
13    */
14    /* hacks to make dokuwiki work  - these are things which would normally be called at window.onload */
15    jQuery(document).on('pjax:success', register_pagetools);
16    jQuery(document).on('pjax:success', (function () {
17           initToolbar('tool__bar','wiki__text',toolbar);
18    }));
19}
20/* the pages not loaded via pjax don't have a pjax success event */
21jQuery(document).ready(register_pagetools);
22
23
24function register_pagetools()
25{
26        jQuery('#toggle_pagetools').on('click',function(e) {
27                var el=document.getElementById('controls');
28                if (el) {
29                        if ('none'==el.style.display) {
30                                el.style.display='block';
31                        } else {
32                                el.style.display='none';
33                        }
34                }
35        });
36}
37// compatability hacks.....
38if (!window.console) console = {log: function() {}};
39
40