-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.php
More file actions
65 lines (60 loc) · 1.75 KB
/
functions.php
File metadata and controls
65 lines (60 loc) · 1.75 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
use Bitrix\Main\EventManager;
use Bitrix\Main\Page\Asset;
use Sl3w\CustomScroll\Settings as Settings;
if (!function_exists('sl3w_asset')) {
function sl3w_asset()
{
return Asset::getInstance();
}
}
if (!function_exists('sl3w_event_manager')) {
function sl3w_event_manager()
{
return EventManager::getInstance();
}
}
if (!function_exists('register_add_css_events_webkit')) {
function register_add_css_events_webkit($reg = true)
{
if ($reg) {
sl3w_event_manager()->registerEventHandler(
'main',
'OnBeforeEndBufferContent',
Settings::getModuleId(),
'Sl3w\CustomScroll\Events',
'AppendScriptsToPageWebkit'
);
} else {
sl3w_event_manager()->unRegisterEventHandler(
'main',
'OnBeforeEndBufferContent',
Settings::getModuleId(),
'Sl3w\CustomScroll\Events',
'AppendScriptsToPageWebkit'
);
}
}
}
if (!function_exists('register_add_css_events_firefox')) {
function register_add_css_events_firefox($reg = true)
{
if ($reg) {
sl3w_event_manager()->registerEventHandler(
'main',
'OnBeforeEndBufferContent',
Settings::getModuleId(),
'Sl3w\CustomScroll\Events',
'AppendScriptsToPageFirefox'
);
} else {
sl3w_event_manager()->unRegisterEventHandler(
'main',
'OnBeforeEndBufferContent',
Settings::getModuleId(),
'Sl3w\CustomScroll\Events',
'AppendScriptsToPageFirefox'
);
}
}
}