2022-09-13 21:44:24 +00:00
|
|
|
/*******************************************************************************
|
|
|
|
|
|
2023-12-04 17:10:34 +00:00
|
|
|
uBlock Origin Lite - a comprehensive, MV3-compliant content blocker
|
2022-09-13 21:44:24 +00:00
|
|
|
Copyright (C) 2014-present Raymond Hill
|
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
|
|
This program 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 General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
|
along with this program. If not, see {http://www.gnu.org/licenses/}.
|
|
|
|
|
|
|
|
|
|
Home: https://github.com/gorhill/uBlock
|
|
|
|
|
*/
|
|
|
|
|
|
2025-12-25 21:32:38 +00:00
|
|
|
import { browser, i18n, sendMessage } from './ext.js';
|
2024-11-17 22:27:27 +00:00
|
|
|
import { dom, qs$ } from './dom.js';
|
2025-04-27 13:02:29 +00:00
|
|
|
import { hashFromIterable } from './dashboard.js';
|
2024-11-17 22:27:27 +00:00
|
|
|
import { renderFilterLists } from './filter-lists.js';
|
2022-09-13 21:44:24 +00:00
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
let cachedRulesetData = {};
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
2024-11-23 18:17:13 +00:00
|
|
|
function renderAdminRules() {
|
|
|
|
|
const { disabledFeatures: forbid = [] } = cachedRulesetData;
|
|
|
|
|
if ( forbid.length === 0 ) { return; }
|
|
|
|
|
dom.body.dataset.forbid = forbid.join(' ');
|
|
|
|
|
if ( forbid.includes('dashboard') ) {
|
|
|
|
|
dom.body.dataset.pane = 'about';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
2023-11-29 21:11:22 +00:00
|
|
|
function renderWidgets() {
|
2022-10-10 16:28:24 +00:00
|
|
|
if ( cachedRulesetData.firstRun ) {
|
|
|
|
|
dom.cl.add(dom.body, 'firstRun');
|
|
|
|
|
}
|
2022-09-30 13:18:52 +00:00
|
|
|
|
2023-11-29 21:11:22 +00:00
|
|
|
renderDefaultMode();
|
2022-09-27 23:51:38 +00:00
|
|
|
|
2024-03-21 17:57:50 +00:00
|
|
|
qs$('#autoReload input[type="checkbox"]').checked = cachedRulesetData.autoReload;
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
const input = qs$('#showBlockedCount input[type="checkbox"]');
|
|
|
|
|
if ( cachedRulesetData.canShowBlockedCount ) {
|
|
|
|
|
input.checked = cachedRulesetData.showBlockedCount;
|
|
|
|
|
} else {
|
|
|
|
|
input.checked = false;
|
|
|
|
|
dom.attr(input, 'disabled', '');
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-11-21 17:54:28 +00:00
|
|
|
|
2024-12-09 14:42:46 +00:00
|
|
|
{
|
|
|
|
|
const input = qs$('#strictBlockMode input[type="checkbox"]');
|
2025-04-13 14:13:18 +00:00
|
|
|
const canStrictBlock = cachedRulesetData.hasOmnipotence;
|
2024-12-09 14:42:46 +00:00
|
|
|
input.checked = canStrictBlock && cachedRulesetData.strictBlockMode;
|
|
|
|
|
dom.attr(input, 'disabled', canStrictBlock ? null : '');
|
|
|
|
|
}
|
2024-12-03 21:41:34 +00:00
|
|
|
|
2024-11-21 17:54:28 +00:00
|
|
|
{
|
[mv3] Add support for custom DNR rules
This feature is hidden behind the "Developer mode" setting in
the dashboard. When "Developer mode" is enabled, a tab named
"Develop" will become available in the dashboard. This tab is
meant to contain tools for technical users.
At the moment, the "Develop" pane allows to create custom DNR
rules through a (CodeMirror-based) editor.
For the sake of convenience, the DNR rule must be entered in
YAML-like format. The format is not really full compliant YAML,
just YAML-like, and very strict in order to ensure the parser
stays simple enough.
Lines starting with `#` are comments and will be ignored by the
parser.
Any line which do not match the parser's expectation will be
marked as invalid, and the whole DNR rule containing such invalid
lines will be discarded.
There must not be empty lines inside a rule definition.
Each DNR rule must be separated with a `---` line, which is
known as a YAML document separator.
String values must not be quoted, otherwise the quotes will be
considered part of the value. There is one exception: `''` will
be parsed as "an empty string".
The editor will attempt to auto-complete known DNR keywords. That
feature will improve over time.
Though the parser will identify some errors, not all invalid DNR
rules are currently identified by the parser, and these will be
reported when the rules are registered through the DNR API. Better
identifying invalid DNR rules at edit time will improve over time.
The editor will report `regexFilter` values which are not
supported by the DNR engine on the current platform.
The editor reacts to instances of `regexFilter: ...` to report
whether a regex value is supported. This means you can test for
a regex value by using `# regexFilter: ...` so that you do not
have to create an actual DNR rules just for the sake of testing.
Custom DNR rules can be exported into a JSON file (a format
known by the DNR API as a "static ruleset").
JSON-based ruleset can be imported, the content will be converted
to YAML-like syntax.
The editor will attempt to convert to YAML pasted content which
can be JSON-parsed. It's possible to paste partially or wholly
JSON-based rulesets.
When disabling "Developer mode", all custom DNR rules will be
unregistered from the DNR API. The DNR rules content will be left
intact in such case. Existing DNR rules will be registered into
the DNR API when re-enabling "Developer mode".
Administrators can prevent "Developer mode" from being enabled
by adding `develop` token to `disabledFeatures` setting.
Related discussion:
https://github.com/uBlockOrigin/uBOL-home/discussions/323
The main motivation is to give list maintainers a tool to assist
with resolving filter issues. Custom DNR rules can assist in
crafting and validating filters meant to work with uBOL.
A secondary motivation is to provide technical users the ability
to further customize their content blocker.
More conveniences will be added over time, this is a first version.
2025-05-29 13:06:02 +00:00
|
|
|
const state = Boolean(cachedRulesetData.developerMode) &&
|
|
|
|
|
cachedRulesetData.disabledFeatures?.includes('develop') !== true;
|
|
|
|
|
dom.body.dataset.develop = `${state}`;
|
|
|
|
|
dom.prop('#developerMode input[type="checkbox"]', 'checked', state);
|
2024-11-21 17:54:28 +00:00
|
|
|
}
|
2023-11-29 21:11:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
|
|
|
|
function renderDefaultMode() {
|
|
|
|
|
const defaultLevel = cachedRulesetData.defaultFilteringMode;
|
|
|
|
|
if ( defaultLevel !== 0 ) {
|
|
|
|
|
qs$(`.filteringModeCard input[type="radio"][value="${defaultLevel}"]`).checked = true;
|
|
|
|
|
} else {
|
|
|
|
|
dom.prop('.filteringModeCard input[type="radio"]', 'checked', false);
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-09-13 21:44:24 +00:00
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
2022-10-10 16:28:24 +00:00
|
|
|
async function onFilteringModeChange(ev) {
|
2022-09-27 23:51:38 +00:00
|
|
|
const input = ev.target;
|
2022-10-10 16:28:24 +00:00
|
|
|
const newLevel = parseInt(input.value, 10);
|
2022-09-28 00:19:59 +00:00
|
|
|
|
2022-10-10 16:28:24 +00:00
|
|
|
switch ( newLevel ) {
|
2025-04-09 19:11:17 +00:00
|
|
|
case 1: {
|
|
|
|
|
const actualLevel = await sendMessage({
|
|
|
|
|
what: 'setDefaultFilteringMode',
|
|
|
|
|
level: newLevel,
|
2022-09-28 00:19:59 +00:00
|
|
|
});
|
2025-04-09 19:11:17 +00:00
|
|
|
cachedRulesetData.defaultFilteringMode = actualLevel;
|
2022-10-10 16:28:24 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case 2:
|
2025-04-09 19:11:17 +00:00
|
|
|
case 3: {
|
2023-06-13 15:40:41 +00:00
|
|
|
const granted = await browser.permissions.request({
|
2025-04-09 19:11:17 +00:00
|
|
|
origins: [ '<all_urls>' ],
|
2022-10-10 16:28:24 +00:00
|
|
|
});
|
2023-06-13 15:40:41 +00:00
|
|
|
if ( granted ) {
|
|
|
|
|
const actualLevel = await sendMessage({
|
|
|
|
|
what: 'setDefaultFilteringMode',
|
|
|
|
|
level: newLevel,
|
|
|
|
|
});
|
|
|
|
|
cachedRulesetData.defaultFilteringMode = actualLevel;
|
2025-04-09 19:11:17 +00:00
|
|
|
cachedRulesetData.hasOmnipotence = true;
|
2023-06-13 15:40:41 +00:00
|
|
|
}
|
2022-10-10 16:28:24 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
2024-11-17 22:27:27 +00:00
|
|
|
renderFilterLists(cachedRulesetData);
|
2022-09-29 23:51:33 +00:00
|
|
|
renderWidgets();
|
2022-09-27 23:51:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dom.on(
|
2022-11-12 14:51:22 +00:00
|
|
|
'#defaultFilteringMode',
|
2022-09-27 23:51:38 +00:00
|
|
|
'change',
|
2022-10-10 16:28:24 +00:00
|
|
|
'.filteringModeCard input[type="radio"]',
|
|
|
|
|
ev => { onFilteringModeChange(ev); }
|
2022-09-27 23:51:38 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
2025-09-27 16:53:58 +00:00
|
|
|
async function backupSettings() {
|
|
|
|
|
const api = await import('./backup-restore.js');
|
|
|
|
|
const data = await api.backupToObject(cachedRulesetData);
|
|
|
|
|
if ( data instanceof Object === false ) { return; }
|
|
|
|
|
const json = JSON.stringify(data, null, 2) + '\n';
|
|
|
|
|
const a = document.createElement('a');
|
|
|
|
|
a.href = `data:text/plain;charset=utf-8,${encodeURIComponent(json)}`;
|
|
|
|
|
dom.attr(a, 'download', 'my-ubol-settings.json');
|
|
|
|
|
dom.attr(a, 'type', 'application/json');
|
|
|
|
|
a.click();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function restoreSettings() {
|
2025-12-27 15:12:34 +00:00
|
|
|
const promise = new Promise(resolve => {
|
|
|
|
|
const input = qs$('section[data-pane="settings"] input[type="file"]');
|
|
|
|
|
input.onchange = ev => {
|
|
|
|
|
dom.cl.add(dom.body, 'busy');
|
|
|
|
|
input.onchange = null;
|
|
|
|
|
const file = ev.target.files[0];
|
|
|
|
|
if ( file === undefined || file.name === '' ) { return resolve(); }
|
|
|
|
|
const fr = new FileReader();
|
|
|
|
|
fr.onload = ( ) => {
|
|
|
|
|
fr.onload = null;
|
|
|
|
|
if ( typeof fr.result !== 'string' ) { return resolve(); }
|
|
|
|
|
let data;
|
|
|
|
|
try {
|
|
|
|
|
data = JSON.parse(fr.result);
|
|
|
|
|
} catch {
|
|
|
|
|
}
|
|
|
|
|
if ( data instanceof Object === false ) { return resolve(); }
|
|
|
|
|
import('./backup-restore.js').then(api => {
|
|
|
|
|
resolve(api.restoreFromObject(data));
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
fr.readAsText(file);
|
|
|
|
|
};
|
|
|
|
|
input.oncancel = ( ) => {
|
|
|
|
|
resolve();
|
2025-09-27 16:53:58 +00:00
|
|
|
};
|
2025-12-27 15:12:34 +00:00
|
|
|
// Reset to empty string, this will ensure a change event is properly
|
|
|
|
|
// triggered if the user pick a file, even if it's the same as the last
|
|
|
|
|
// one picked.
|
|
|
|
|
input.value = '';
|
|
|
|
|
input.click();
|
|
|
|
|
});
|
|
|
|
|
await promise;
|
|
|
|
|
dom.cl.remove(dom.body, 'busy');
|
2025-09-27 16:53:58 +00:00
|
|
|
}
|
|
|
|
|
|
2025-12-25 21:32:38 +00:00
|
|
|
async function resetSettings() {
|
|
|
|
|
const response = self.confirm(i18n.getMessage('resetToDefaultConfirm'));
|
|
|
|
|
if ( response !== true ) { return; }
|
2025-12-27 15:12:34 +00:00
|
|
|
dom.cl.add(dom.body, 'busy');
|
2025-12-25 21:32:38 +00:00
|
|
|
const api = await import('./backup-restore.js');
|
|
|
|
|
await api.restoreFromObject({});
|
2025-12-27 15:12:34 +00:00
|
|
|
dom.cl.remove(dom.body, 'busy');
|
2025-12-25 21:32:38 +00:00
|
|
|
}
|
|
|
|
|
|
2025-09-27 16:53:58 +00:00
|
|
|
/******************************************************************************/
|
|
|
|
|
|
2024-03-21 17:57:50 +00:00
|
|
|
dom.on('#autoReload input[type="checkbox"]', 'change', ev => {
|
2022-10-10 16:28:24 +00:00
|
|
|
sendMessage({
|
|
|
|
|
what: 'setAutoReload',
|
|
|
|
|
state: ev.target.checked,
|
|
|
|
|
});
|
|
|
|
|
});
|
2022-09-13 21:44:24 +00:00
|
|
|
|
2024-03-21 17:57:50 +00:00
|
|
|
dom.on('#showBlockedCount input[type="checkbox"]', 'change', ev => {
|
|
|
|
|
sendMessage({
|
|
|
|
|
what: 'setShowBlockedCount',
|
|
|
|
|
state: ev.target.checked,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2024-12-03 21:41:34 +00:00
|
|
|
dom.on('#strictBlockMode input[type="checkbox"]', 'change', ev => {
|
|
|
|
|
sendMessage({
|
|
|
|
|
what: 'setStrictBlockMode',
|
|
|
|
|
state: ev.target.checked,
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
2024-11-21 17:54:28 +00:00
|
|
|
dom.on('#developerMode input[type="checkbox"]', 'change', ev => {
|
[mv3] Add support for custom DNR rules
This feature is hidden behind the "Developer mode" setting in
the dashboard. When "Developer mode" is enabled, a tab named
"Develop" will become available in the dashboard. This tab is
meant to contain tools for technical users.
At the moment, the "Develop" pane allows to create custom DNR
rules through a (CodeMirror-based) editor.
For the sake of convenience, the DNR rule must be entered in
YAML-like format. The format is not really full compliant YAML,
just YAML-like, and very strict in order to ensure the parser
stays simple enough.
Lines starting with `#` are comments and will be ignored by the
parser.
Any line which do not match the parser's expectation will be
marked as invalid, and the whole DNR rule containing such invalid
lines will be discarded.
There must not be empty lines inside a rule definition.
Each DNR rule must be separated with a `---` line, which is
known as a YAML document separator.
String values must not be quoted, otherwise the quotes will be
considered part of the value. There is one exception: `''` will
be parsed as "an empty string".
The editor will attempt to auto-complete known DNR keywords. That
feature will improve over time.
Though the parser will identify some errors, not all invalid DNR
rules are currently identified by the parser, and these will be
reported when the rules are registered through the DNR API. Better
identifying invalid DNR rules at edit time will improve over time.
The editor will report `regexFilter` values which are not
supported by the DNR engine on the current platform.
The editor reacts to instances of `regexFilter: ...` to report
whether a regex value is supported. This means you can test for
a regex value by using `# regexFilter: ...` so that you do not
have to create an actual DNR rules just for the sake of testing.
Custom DNR rules can be exported into a JSON file (a format
known by the DNR API as a "static ruleset").
JSON-based ruleset can be imported, the content will be converted
to YAML-like syntax.
The editor will attempt to convert to YAML pasted content which
can be JSON-parsed. It's possible to paste partially or wholly
JSON-based rulesets.
When disabling "Developer mode", all custom DNR rules will be
unregistered from the DNR API. The DNR rules content will be left
intact in such case. Existing DNR rules will be registered into
the DNR API when re-enabling "Developer mode".
Administrators can prevent "Developer mode" from being enabled
by adding `develop` token to `disabledFeatures` setting.
Related discussion:
https://github.com/uBlockOrigin/uBOL-home/discussions/323
The main motivation is to give list maintainers a tool to assist
with resolving filter issues. Custom DNR rules can assist in
crafting and validating filters meant to work with uBOL.
A secondary motivation is to provide technical users the ability
to further customize their content blocker.
More conveniences will be added over time, this is a first version.
2025-05-29 13:06:02 +00:00
|
|
|
const state = ev.target.checked;
|
|
|
|
|
sendMessage({ what: 'setDeveloperMode', state });
|
|
|
|
|
dom.body.dataset.develop = `${state}`;
|
2024-11-21 17:54:28 +00:00
|
|
|
});
|
|
|
|
|
|
2025-09-27 16:53:58 +00:00
|
|
|
dom.on('section[data-pane="settings"] [data-i18n="backupButton"]', 'click', ( ) => {
|
|
|
|
|
backupSettings();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
dom.on('section[data-pane="settings"] [data-i18n="restoreButton"]', 'click', ( ) => {
|
|
|
|
|
restoreSettings();
|
|
|
|
|
});
|
|
|
|
|
|
2025-12-25 21:32:38 +00:00
|
|
|
dom.on('section[data-pane="settings"] [data-i18n="resetToDefaultButton"]', 'click', ( ) => {
|
|
|
|
|
resetSettings();
|
|
|
|
|
});
|
|
|
|
|
|
2022-09-13 21:44:24 +00:00
|
|
|
/******************************************************************************/
|
|
|
|
|
|
2024-11-11 18:20:54 +00:00
|
|
|
function listen() {
|
|
|
|
|
const bc = new self.BroadcastChannel('uBOL');
|
|
|
|
|
bc.onmessage = listen.onmessage;
|
|
|
|
|
}
|
2023-11-29 21:11:22 +00:00
|
|
|
|
2024-11-11 18:20:54 +00:00
|
|
|
listen.onmessage = ev => {
|
2023-11-29 21:11:22 +00:00
|
|
|
const message = ev.data;
|
|
|
|
|
if ( message instanceof Object === false ) { return; }
|
|
|
|
|
const local = cachedRulesetData;
|
|
|
|
|
let render = false;
|
|
|
|
|
|
2025-04-13 14:13:18 +00:00
|
|
|
if ( message.hasOmnipotence !== undefined ) {
|
|
|
|
|
if ( message.hasOmnipotence !== local.hasOmnipotence ) {
|
|
|
|
|
local.hasOmnipotence = message.hasOmnipotence;
|
|
|
|
|
render = true;
|
|
|
|
|
}
|
2023-11-29 21:11:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( message.defaultFilteringMode !== undefined ) {
|
|
|
|
|
if ( message.defaultFilteringMode !== local.defaultFilteringMode ) {
|
|
|
|
|
local.defaultFilteringMode = message.defaultFilteringMode;
|
|
|
|
|
render = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( message.autoReload !== undefined ) {
|
|
|
|
|
if ( message.autoReload !== local.autoReload ) {
|
|
|
|
|
local.autoReload = message.autoReload;
|
|
|
|
|
render = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-21 17:57:50 +00:00
|
|
|
if ( message.showBlockedCount !== undefined ) {
|
|
|
|
|
if ( message.showBlockedCount !== local.showBlockedCount ) {
|
|
|
|
|
local.showBlockedCount = message.showBlockedCount;
|
|
|
|
|
render = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-03 21:41:34 +00:00
|
|
|
if ( message.strictBlockMode !== undefined ) {
|
|
|
|
|
if ( message.strictBlockMode !== local.strictBlockMode ) {
|
|
|
|
|
local.strictBlockMode = message.strictBlockMode;
|
|
|
|
|
render = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-06 12:45:19 +00:00
|
|
|
if ( message.developerMode !== undefined ) {
|
|
|
|
|
if ( message.developerMode !== local.developerMode ) {
|
|
|
|
|
local.developerMode = message.developerMode;
|
|
|
|
|
render = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-11 18:20:54 +00:00
|
|
|
if ( message.adminRulesets !== undefined ) {
|
|
|
|
|
if ( hashFromIterable(message.adminRulesets) !== hashFromIterable(local.adminRulesets) ) {
|
|
|
|
|
local.adminRulesets = message.adminRulesets;
|
|
|
|
|
render = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-29 21:11:22 +00:00
|
|
|
if ( message.enabledRulesets !== undefined ) {
|
2025-08-11 21:53:59 +00:00
|
|
|
local.enabledRulesets = message.enabledRulesets;
|
|
|
|
|
render = true;
|
2023-11-29 21:11:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( render === false ) { return; }
|
2024-11-17 22:27:27 +00:00
|
|
|
renderFilterLists(cachedRulesetData);
|
2023-11-29 21:11:22 +00:00
|
|
|
renderWidgets();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|
|
|
|
|
|
2022-09-13 21:44:24 +00:00
|
|
|
sendMessage({
|
2022-10-10 16:28:24 +00:00
|
|
|
what: 'getOptionsPageData',
|
2022-09-13 21:44:24 +00:00
|
|
|
}).then(data => {
|
|
|
|
|
if ( !data ) { return; }
|
|
|
|
|
cachedRulesetData = data;
|
|
|
|
|
try {
|
2024-11-23 18:17:13 +00:00
|
|
|
renderAdminRules();
|
2024-11-17 22:27:27 +00:00
|
|
|
renderFilterLists(cachedRulesetData);
|
2023-11-29 02:13:44 +00:00
|
|
|
renderWidgets();
|
2025-05-14 21:20:55 +00:00
|
|
|
} catch(reason) {
|
|
|
|
|
console.error(reason);
|
2025-08-29 15:19:24 +00:00
|
|
|
} finally {
|
|
|
|
|
dom.cl.remove(dom.body, 'loading');
|
2022-09-13 21:44:24 +00:00
|
|
|
}
|
2024-11-11 18:20:54 +00:00
|
|
|
listen();
|
2022-09-13 21:44:24 +00:00
|
|
|
}).catch(reason => {
|
2025-08-11 21:53:59 +00:00
|
|
|
console.error(reason);
|
2022-09-13 21:44:24 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/******************************************************************************/
|