/
ui-service.js
749 lines (660 loc) · 25.8 KB
/
ui-service.js
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
/**
* This file is part of Adguard Browser Extension (https://github.com/AdguardTeam/AdguardBrowserExtension).
*
* Adguard Browser Extension is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Adguard Browser Extension is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Adguard Browser Extension. If not, see <http://www.gnu.org/licenses/>.
*/
adguard.ui = (function (adguard) { // jshint ignore:line
var browserActionTitle = adguard.i18n.getMessage('name');
var contextMenuCallbackMappings = {
'context_block_site_ads': function () {
openAssistant();
},
'context_block_site_element': function () {
openAssistant(true);
},
'context_security_report': function () {
adguard.tabs.getActive(function (tab) {
openSiteReportTab(tab.url);
});
},
'context_site_filtering_on': function () {
adguard.tabs.getActive(unWhiteListTab);
},
'context_site_filtering_off': function () {
adguard.tabs.getActive(whiteListTab);
},
'context_enable_protection': function () {
changeApplicationFilteringDisabled(false);
},
'context_disable_protection': function () {
changeApplicationFilteringDisabled(true);
},
'context_open_settings': function () {
openSettingsTab();
},
'context_general_settings': function () {
openSettingsTab('general-settings');
},
'context_antibanner': function () {
openSettingsTab('antibanner');
},
'context_safebrowsing': function () {
openSettingsTab('safebrowsing');
},
'context_whitelist': function () {
openSettingsTab('whitelist');
},
'context_userfilter': function () {
openSettingsTab('userfilter');
},
'context_miscellaneous_settings': function () {
openSettingsTab('miscellaneous-settings');
},
'context_open_log': function () {
openFilteringLog();
},
'context_update_antibanner_filters': function () {
checkFiltersUpdates();
},
'context_ads_has_been_removed_by_adguard': function () {
openIntegrationModeInfo();
}
};
var nextMenuId = 0;
var extensionStoreLink = (function () {
var urlBuilder = ["http://adguard.com/"];
if (adguard.app.getLocale() === "ru") {
urlBuilder.push("ru");
} else {
urlBuilder.push("en");
}
urlBuilder.push("/extension-page.html?browser=");
if (adguard.utils.browser.isOperaBrowser()) {
urlBuilder.push("opera");
} else if (adguard.utils.browser.isFirefoxBrowser()) {
urlBuilder.push("firefox");
} else if (adguard.utils.browser.isYaBrowser()) {
urlBuilder.push("yabrowser");
} else if (adguard.utils.browser.isSafariBrowser()) {
urlBuilder.push("safari");
} else if (adguard.utils.browser.isEdgeBrowser()) {
urlBuilder.push("edge");
} else {
urlBuilder.push("chrome");
}
return urlBuilder.join("");
})();
// Assistant
var assistantOptions = null;
/**
* Returns localization map by passed message identifiers
* @param ids Message identifiers
*/
function getLocalization(ids) {
var result = {};
for (var id in ids) {
if (ids.hasOwnProperty(id)) {
var current = ids[id];
result[current] = adguard.i18n.getMessage(current);
}
}
return result;
}
function getAssistantOptions() {
if (assistantOptions !== null) {
return assistantOptions;
}
assistantOptions = {
cssLink: adguard.getURL('lib/content-script/assistant/css/assistant.css'),
addRuleCallbackName: 'addUserRule'
};
var ids = [
'assistant_select_element',
'assistant_select_element_ext',
'assistant_select_element_cancel',
'assistant_block_element',
'assistant_block_element_explain',
'assistant_slider_explain',
'assistant_slider_if_hide',
'assistant_slider_min',
'assistant_slider_max',
'assistant_extended_settings',
'assistant_apply_rule_to_all_sites',
'assistant_block_by_reference',
'assistant_block_similar',
'assistant_block',
'assistant_another_element',
'assistant_preview',
'assistant_preview_header',
'assistant_preview_header_info',
'assistant_preview_end',
'assistant_preview_start'
];
assistantOptions.localization = getLocalization(ids);
return assistantOptions;
}
/**
* Update icon for tab
* @param tab Tab
* @param options Options for icon or badge values
*/
function updateTabIcon(tab, options) {
try {
var icon, badge;
if (options) {
icon = options.icon;
badge = options.badge;
} else {
var blocked;
var disabled;
var tabInfo = adguard.frames.getFrameInfo(tab);
if (tabInfo.adguardDetected) {
disabled = tabInfo.documentWhiteListed;
blocked = "";
} else {
disabled = tabInfo.applicationFilteringDisabled;
disabled = disabled || tabInfo.urlFilteringDisabled;
disabled = disabled || tabInfo.documentWhiteListed;
if (!disabled && adguard.settings.showPageStatistic()) {
blocked = tabInfo.totalBlockedTab.toString();
} else {
blocked = "0";
}
}
badge = adguard.utils.workaround.getBlockedCountText(blocked);
if (disabled) {
icon = adguard.prefs.ICONS.ICON_GRAY;
} else if (tabInfo.adguardDetected) {
icon = adguard.prefs.ICONS.ICON_BLUE;
} else {
icon = adguard.prefs.ICONS.ICON_GREEN;
}
}
adguard.browserAction.setBrowserAction(tab, icon, badge, "#555", browserActionTitle);
} catch (ex) {
adguard.console.error('Error while updating icon for tab {0}: {1}', tab.tabId, new Error(ex));
}
}
var updateTabIconAsync = adguard.utils.concurrent.debounce(function (tab) {
updateTabIcon(tab);
}, 250);
/**
* Creates context menu item
* @param title Title id
* @param options Create options
*/
function addMenu(title, options) {
var createProperties = {
contexts: ["all"],
title: adguard.i18n.getMessage(title)
};
if (options) {
if (options.id) {
createProperties.id = options.id;
}
if (options.parentId) {
createProperties.parentId = options.parentId;
}
if (options.disabled) {
createProperties.enabled = false;
}
if (options.messageArgs) {
createProperties.title = adguard.i18n.getMessage(title, options.messageArgs);
}
if (options.contexts) {
createProperties.contexts = options.contexts;
}
if ('checkable' in options) {
createProperties.checkable = options.checkable;
}
if ('checked' in options) {
createProperties.checked = options.checked;
}
}
var callback;
if (options && options.action) {
callback = contextMenuCallbackMappings[options.action];
} else {
callback = contextMenuCallbackMappings[title];
}
if (typeof callback === 'function') {
createProperties.onclick = callback;
}
adguard.contextMenus.create(createProperties);
}
function customizeContextMenu(tab) {
function addSeparator() {
adguard.contextMenus.create({
type: 'separator'
});
}
function addSettingsSubMenu() {
nextMenuId += 1;
var menuId = 'adguard-settings-context-menu-' + nextMenuId;
addMenu('context_open_settings', {id: menuId});
addMenu('context_general_settings', {parentId: menuId});
addMenu('context_antibanner', {parentId: menuId});
addMenu('context_safebrowsing', {parentId: menuId});
addMenu('context_whitelist', {parentId: menuId});
addMenu('context_userfilter', {parentId: menuId});
addMenu('context_miscellaneous_settings', {parentId: menuId});
}
var tabInfo = adguard.frames.getFrameInfo(tab);
if (tabInfo.applicationFilteringDisabled) {
addMenu('context_site_protection_disabled');
addSeparator();
addMenu('context_open_log');
addSettingsSubMenu();
addMenu('context_enable_protection');
} else if (tabInfo.urlFilteringDisabled) {
addMenu('context_site_filtering_disabled');
addSeparator();
addMenu('context_open_log');
addSettingsSubMenu();
addMenu('context_update_antibanner_filters');
} else {
if (tabInfo.adguardDetected) {
if (tabInfo.adguardProductName) {
addMenu('context_ads_has_been_removed_by_adguard', {messageArgs: [tabInfo.adguardProductName]});
} else {
addMenu('context_ads_has_been_removed');
}
addSeparator();
}
if (tabInfo.documentWhiteListed && !tabInfo.userWhiteListed) {
addMenu('context_site_exception');
} else if (tabInfo.canAddRemoveRule) {
if (tabInfo.documentWhiteListed) {
addMenu('context_site_filtering_on');
} else {
addMenu('context_site_filtering_off');
}
}
addSeparator();
if (!tabInfo.documentWhiteListed) {
addMenu('context_block_site_ads');
addMenu('context_block_site_element', {contexts: ["image", "video", "audio"]});
}
addMenu('context_open_log');
addMenu('context_security_report');
if (!tabInfo.adguardDetected) {
addSeparator();
addSettingsSubMenu();
addMenu('context_update_antibanner_filters');
addMenu('context_disable_protection');
}
}
}
function customizeMobileContextMenu(tab) {
var tabInfo = adguard.frames.getFrameInfo(tab);
if (tabInfo.applicationFilteringDisabled) {
addMenu('popup_site_protection_disabled_android', {
action: 'context_enable_protection',
checked: true,
checkable: true
});
addMenu('popup_open_log_android', {action: 'context_open_log'});
addMenu('popup_open_settings', {action: 'context_open_settings'});
} else if (tabInfo.urlFilteringDisabled) {
addMenu('context_site_filtering_disabled');
addMenu('popup_open_log_android', {action: 'context_open_log'});
addMenu('popup_open_settings', {action: 'context_open_settings'});
addMenu('context_update_antibanner_filters');
} else {
addMenu('popup_site_protection_disabled_android', {
action: 'context_disable_protection',
checked: false,
checkable: true
});
if (tabInfo.documentWhiteListed && !tabInfo.userWhiteListed) {
addMenu('popup_in_white_list_android');
} else if (tabInfo.canAddRemoveRule) {
if (tabInfo.documentWhiteListed) {
addMenu('popup_site_filtering_state', {
action: 'context_site_filtering_on',
checkable: true,
checked: false
});
} else {
addMenu('popup_site_filtering_state', {
action: 'context_site_filtering_off',
checkable: true,
checked: true
});
}
}
if (!tabInfo.documentWhiteListed) {
addMenu('popup_block_site_ads_android', {action: 'context_block_site_ads'});
}
addMenu('popup_open_log_android', {action: 'context_open_log'});
addMenu('popup_security_report_android', {action: 'context_security_report'});
addMenu('popup_open_settings', {action: 'context_open_settings'});
addMenu('context_update_antibanner_filters');
}
}
/**
* Update context menu for tab
* @param tab Tab
*/
function updateTabContextMenu(tab) {
adguard.contextMenus.removeAll();
if (adguard.settings.showContextMenu()) {
if (adguard.prefs.mobile) {
customizeMobileContextMenu(tab);
} else {
customizeContextMenu(tab);
}
if (typeof adguard.contextMenus.render === 'function') {
// In some case we need to manually render context menu
adguard.contextMenus.render();
}
}
}
function closeAllPages() {
adguard.tabs.forEach(function (tab) {
if (tab.url.indexOf(adguard.getURL('')) >= 0) {
adguard.tabs.remove(tab.tabId);
}
});
}
function getPageUrl(page) {
return adguard.getURL('pages/' + page);
}
function showAlertMessagePopup(title, text, showForAdguardTab) {
adguard.tabs.getActive(function (tab) {
if (!showForAdguardTab && adguard.frames.isTabAdguardDetected(tab)) {
return;
}
adguard.tabs.sendMessage(tab.tabId, {
type: 'show-alert-popup',
title: title,
text: text
});
});
adguard.tabs.getActive(function (tab) {
adguard.tabs.sendMessage(tab.tabId, {type: 'show-alert-popup', title: title, text: text});
});
}
function getFiltersUpdateResultMessage(success, updatedFilters) {
var title = adguard.i18n.getMessage("options_popup_update_title");
var text = [];
if (success) {
if (updatedFilters.length === 0) {
text.push(adguard.i18n.getMessage("options_popup_update_not_found"));
} else {
updatedFilters.sort(function (a, b) {
return a.displayNumber - b.displayNumber;
});
for (var i = 0; i < updatedFilters.length; i++) {
var filter = updatedFilters[i];
text.push(adguard.i18n.getMessage("options_popup_update_updated", [filter.name, filter.version]).replace("$1", filter.name).replace("$2", filter.version));
}
}
} else {
text.push(adguard.i18n.getMessage("options_popup_update_error"));
}
return {
title: title,
text: text
};
}
function getFiltersEnabledResultMessage(enabledFilters) {
var title = adguard.i18n.getMessage("alert_popup_filter_enabled_title");
var text = [];
enabledFilters.sort(function (a, b) {
return a.displayNumber - b.displayNumber;
});
for (var i = 0; i < enabledFilters.length; i++) {
var filter = enabledFilters[i];
text.push(adguard.i18n.getMessage("alert_popup_filter_enabled_text", [filter.name]).replace("$1", filter.name));
}
return {
title: title,
text: text
};
}
var updateTabIconAndContextMenu = function (tab, reloadFrameData) {
if (reloadFrameData) {
adguard.frames.reloadFrameData(tab);
}
updateTabIcon(tab);
updateTabContextMenu(tab);
};
var openExportRulesTab = function (whitelist) {
openTab(getPageUrl('export.html' + (whitelist ? '#wl' : '')));
};
var openSettingsTab = function (anchor) {
openTab(getPageUrl('options.html') + (anchor ? '#' + anchor : ''), {activateSameTab: true});
};
var openSiteReportTab = function (url) {
var domain = adguard.utils.url.toPunyCode(adguard.utils.url.getDomainName(url));
if (domain) {
openTab("https://adguard.com/site.html?domain=" + encodeURIComponent(domain) + "&utm_source=extension&aid=16593");
}
};
var openFilteringLog = function (tabId) {
var options = {activateSameTab: true, type: "popup"};
if (!tabId) {
adguard.tabs.getActive(function (tab) {
var tabId = tab.tabId;
openTab(getPageUrl('log.html') + (tabId ? "#" + tabId : ""), options);
});
return;
}
openTab(getPageUrl('log.html') + (tabId ? "#" + tabId : ""), options);
};
var openThankYouPage = function () {
var filtersDownloadUrl = getPageUrl('filter-download.html');
var thankyouUrl = getPageUrl('thankyou.html');
adguard.tabs.getAll(function (tabs) {
for (var i = 0; i < tabs.length; i++) {
var tab = tabs[i];
if (tab.url === filtersDownloadUrl || tab.url === thankyouUrl) {
// In YaBrowser don't activate found page
if (!adguard.utils.browser.isYaBrowser()) {
adguard.tabs.activate(tab.tabId);
}
if (tab.url !== thankyouUrl) {
adguard.tabs.reload(tab.tabId, thankyouUrl);
}
return;
}
}
openTab(thankyouUrl);
});
};
var openIntegrationModeInfo = function () {
openTab('https://adguard.com/adguard-adblock-browser-extension/integration-mode.html#integrationMode');
};
var openExtensionStore = function () {
openTab(extensionStoreLink);
};
var openFiltersDownloadPage = function () {
openTab(getPageUrl('filter-download.html'), {inBackground: adguard.utils.browser.isYaBrowser()});
};
var whiteListTab = function (tab) {
var tabInfo = adguard.frames.getFrameInfo(tab);
adguard.whitelist.whiteListUrl(tabInfo.url);
if (adguard.frames.isTabAdguardDetected(tab)) {
var domain = adguard.utils.url.getHost(tab.url);
adguard.integration.addRuleToApp("@@//" + domain + "^$document", function () {
adguard.tabs.sendMessage(tab.tabId, {type: 'no-cache-reload'});
});
} else {
updateTabIconAndContextMenu(tab, true);
}
};
var unWhiteListTab = function (tab) {
var tabInfo = adguard.frames.getFrameInfo(tab);
adguard.userrules.unWhiteListFrame(tabInfo);
if (adguard.frames.isTabAdguardDetected(tab)) {
var rule = adguard.frames.getTabAdguardUserWhiteListRule(tab);
if (rule) {
adguard.integration.removeRuleFromApp(rule.ruleText, function () {
adguard.tabs.sendMessage(tab.tabId, {type: 'no-cache-reload'});
});
}
} else {
updateTabIconAndContextMenu(tab, true);
}
};
var changeApplicationFilteringDisabled = function (disabled) {
adguard.settings.changeFilteringDisabled(disabled);
adguard.tabs.getActive(function (tab) {
updateTabIconAndContextMenu(tab, true);
});
};
var checkFiltersUpdates = function () {
adguard.filters.checkFiltersUpdates(function (updatedFilters) {
adguard.listeners.notifyListeners(adguard.listeners.UPDATE_FILTERS_SHOW_POPUP, true, updatedFilters);
}, function () {
adguard.listeners.notifyListeners(adguard.listeners.UPDATE_FILTERS_SHOW_POPUP, false);
});
};
var openAssistant = function (selectElement) {
var options = getAssistantOptions();
options.selectElement = selectElement;
adguard.tabs.getActive(function (tab) {
adguard.tabs.sendMessage(tab.tabId, {
type: 'initAssistant',
options: options
});
});
};
var openTab = function (url, options, callback) {
var activateSameTab, inNewWindow, type, inBackground;
if (options) {
activateSameTab = options.activateSameTab;
inBackground = options.inBackground;
inNewWindow = options.inNewWindow;
type = options.type;
}
function onTabFound(tab) {
if (tab.url !== url) {
adguard.tabs.reload(tab.tabId, url);
}
if (!inBackground) {
adguard.tabs.activate(tab.tabId);
}
if (callback) {
callback(tab);
}
}
url = adguard.utils.strings.contains(url, "://") ? url : adguard.getURL(url);
adguard.tabs.getAll(function (tabs) {
//try to find between opened tabs
if (activateSameTab) {
for (var i = 0; i < tabs.length; i++) {
var tab = tabs[i];
if (adguard.utils.url.urlEquals(tab.url, url)) {
onTabFound(tab);
return;
}
}
}
adguard.tabs.create({
url: url,
type: type || 'normal',
active: !inBackground,
inNewWindow: inNewWindow
}, callback);
});
};
//update icon on event received
adguard.listeners.addListener(function (event, tab, reset) {
if (event !== adguard.listeners.UPDATE_TAB_BUTTON_STATE || !tab) {
return;
}
var options;
if (reset) {
options = {icon: adguard.prefs.ICONS.ICON_GRAY, badge: ''};
}
updateTabIcon(tab, options);
});
// Update icon on ads blocked
adguard.listeners.addListener(function (event, rule, tab, blocked) {
if (event !== adguard.listeners.ADS_BLOCKED || !tab) {
return;
}
var tabBlocked = adguard.frames.updateBlockedAdsCount(tab, blocked);
if (tabBlocked === null) {
return;
}
updateTabIconAsync(tab);
});
// Update context menu on change user settings
adguard.settings.onUpdated.addListener(function (setting) {
if (setting === adguard.settings.DISABLE_SHOW_CONTEXT_MENU) {
adguard.tabs.getActive(function (tab) {
updateTabContextMenu(tab);
});
}
});
// Update tab icon and context menu while loading
adguard.tabs.onUpdated.addListener(function (tab) {
var tabId = tab.tabId;
// BrowserAction is set separately for each tab
updateTabIcon(tab);
adguard.tabs.getActive(function (aTab) {
if (aTab.tabId !== tabId) {
return;
}
// ContextMenu is set for all tabs, so update it only for current tab
updateTabContextMenu(aTab);
});
});
// Update tab icon and context menu on active tab changed
adguard.tabs.onActivated.addListener(function (tab) {
updateTabIconAndContextMenu(tab, true);
});
// Update tab icon and context menu on application initialization
adguard.listeners.addListener(function (event) {
if (event === adguard.listeners.APPLICATION_INITIALIZED) {
adguard.tabs.getActive(updateTabIconAndContextMenu);
}
});
//on filter auto-enabled event
adguard.listeners.addListener(function (event, enabledFilters) {
if (event === adguard.listeners.ENABLE_FILTER_SHOW_POPUP) {
var result = getFiltersEnabledResultMessage(enabledFilters);
showAlertMessagePopup(result.title, result.text);
}
});
//on filters updated event
adguard.listeners.addListener(function (event, success, updatedFilters) {
if (event === adguard.listeners.UPDATE_FILTERS_SHOW_POPUP) {
var result = getFiltersUpdateResultMessage(success, updatedFilters);
showAlertMessagePopup(result.title, result.text);
}
});
//close all page on unload
adguard.unload.when(closeAllPages);
return {
openExportRulesTab: openExportRulesTab,
openSettingsTab: openSettingsTab,
openSiteReportTab: openSiteReportTab,
openFilteringLog: openFilteringLog,
openThankYouPage: openThankYouPage,
openExtensionStore: openExtensionStore,
openFiltersDownloadPage: openFiltersDownloadPage,
updateTabIconAndContextMenu: updateTabIconAndContextMenu,
whiteListTab: whiteListTab,
unWhiteListTab: unWhiteListTab,
changeApplicationFilteringDisabled: changeApplicationFilteringDisabled,
checkFiltersUpdates: checkFiltersUpdates,
openAssistant: openAssistant,
openTab: openTab,
showAlertMessagePopup: showAlertMessagePopup
};
})(adguard);