1<?php
2
3if(!defined('DOKU_INC')) die();
4
5class action_plugin_pdfjs extends DokuWiki_Action_Plugin {
6    /**
7     * @param Doku_Event_Handler $controller
8     */
9    public function register(Doku_Event_Handler $controller) {
10        $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'add_jsinfo');
11    }
12
13    /**
14     * @param Doku_Event $event
15     */
16    public function add_jsinfo(Doku_Event $event) {
17        global $JSINFO;
18
19        $JSINFO['plugin_pdfjs']['hide_download_button'] = $this->getConf('hide_download_button');
20    }
21}
22