uBlock/platform/mv3/extension/js/dashboard.js
Raymond Hill b50341089d
[mv3] Expand "Develop" pane
Move "No filtering" section in "Settings" to "Develop" pane. It is
now possible to view/edit the list of hostnames for any of the
filtering mode. This takes care of these issues:
- https://github.com/uBlockOrigin/uBOL-home/issues/270
- https://github.com/uBlockOrigin/uBOL-home/issues/297

Add ability to see all rulesets (read-only), to assist in investigating
filtering issues.
2025-06-13 12:46:05 -04:00

61 lines
1.9 KiB
JavaScript

/*******************************************************************************
uBlock Origin Lite - a comprehensive, MV3-compliant content blocker
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
*/
import {
localRead,
localRemove,
localWrite,
} from './ext.js';
import { dom } from './dom.js';
import { runtime } from './ext.js';
/******************************************************************************/
{
const manifest = runtime.getManifest();
dom.text('#aboutNameVer', `${manifest.name} ${manifest.version}`);
}
dom.attr('a', 'target', '_blank');
dom.on('#dashboard-nav', 'click', '.tabButton', ev => {
const { pane } = ev.target.dataset;
dom.body.dataset.pane = pane;
if ( pane === 'settings' ) {
localRemove('dashboard.activePane');
} else {
localWrite('dashboard.activePane', pane);
}
});
localRead('dashboard.activePane').then(pane => {
if ( typeof pane !== 'string' ) { return; }
dom.body.dataset.pane = pane;
});
/******************************************************************************/
export function hashFromIterable(iter) {
return Array.from(iter).sort().join('\n');
}
/******************************************************************************/