-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
extension.php
29 lines (24 loc) · 839 Bytes
/
extension.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
class WallabagButtonExtension extends Minz_Extension
{
#[\Override]
public function init(): void
{
$this->registerTranslates();
Minz_View::appendScript($this->getFileUrl('script.js', 'js'), false, false, false);
Minz_View::appendStyle($this->getFileUrl('style.css', 'css'));
Minz_View::appendScript(strval(_url('wallabagButton', 'jsVars')), false, true, false);
$this->registerController('wallabagButton');
$this->registerViews();
}
#[\Override]
public function handleConfigureAction(): void
{
$this->registerTranslates();
if (Minz_Request::isPost()) {
$keyboard_shortcut = Minz_Request::paramString('keyboard_shortcut');
FreshRSS_Context::userConf()->_attribute('wallabag_keyboard_shortcut', $keyboard_shortcut);
FreshRSS_Context::userConf()->save();
}
}
}