1<?php 2 3/* 4 * Copyright (c) 2012-2026 Mark C. Prins <mprins@users.sf.net> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * 18 * @author Mark C. Prins <mprins@users.sf.net> 19 * 20 * @phpcs:disable Squiz.Classes.ValidClassName.NotPascalCase 21 */ 22 23/** 24 * DokuWiki Plugin snow (Action Component). 25 */ 26 27class action_plugin_snow extends DokuWiki_Action_Plugin 28{ 29 public function register(Doku_Event_Handler $controller): void 30 { 31 $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'addJsinfoInformation'); 32 } 33 34 public function addJsinfoInformation(): void 35 { 36 global $JSINFO; 37 38 $JSINFO['plugin']['snow']['enabled'] = $this->getConf('enabled'); 39 $JSINFO['plugin']['snow']['zindex'] = $this->getConf('zindex'); 40 $JSINFO['plugin']['snow']['color'] = $this->getConf('color'); 41 $JSINFO['plugin']['snow']['excludemobile'] = $this->getConf('excludemobile'); 42 $JSINFO['plugin']['snow']['flakesmax'] = $this->getConf('flakesmax'); 43 $JSINFO['plugin']['snow']['flakesmaxactive'] = $this->getConf('flakesmaxactive'); 44 $JSINFO['plugin']['snow']['animationinterval'] = $this->getConf('animationinterval'); 45 $JSINFO['plugin']['snow']['usegpu'] = $this->getConf('usegpu'); 46 $JSINFO['plugin']['snow']['followmouse'] = $this->getConf('followmouse'); 47 $JSINFO['plugin']['snow']['snowstick'] = $this->getConf('snowstick'); 48 $JSINFO['plugin']['snow']['usemelteffect'] = $this->getConf('usemelteffect'); 49 $JSINFO['plugin']['snow']['usetwinkleeffect'] = $this->getConf('usetwinkleeffect'); 50 $JSINFO['plugin']['snow']['freezeonblur'] = $this->getConf('freezeonblur'); 51 } 52} 53