mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
[mv3] Remove hostname normalization regarding filtering mode
Related issue: https://github.com/uBlockOrigin/uBOL-home/issues/388#issuecomment-3075440422
This commit is contained in:
parent
e07e7bbd09
commit
d7686a815e
2 changed files with 2 additions and 9 deletions
|
|
@ -332,7 +332,7 @@ function onMessage(request, sender, callback) {
|
|||
case 'popupPanelData': {
|
||||
Promise.all([
|
||||
hasBroadHostPermissions(),
|
||||
getFilteringMode(request.normalHostname),
|
||||
getFilteringMode(request.hostname),
|
||||
adminReadEx('disabledFeatures'),
|
||||
hasCustomFilters(request.hostname),
|
||||
]).then(results => {
|
||||
|
|
|
|||
|
|
@ -32,12 +32,6 @@ const tabURL = new URL(runtime.getURL('/'));
|
|||
|
||||
/******************************************************************************/
|
||||
|
||||
function normalizedHostname(hn) {
|
||||
return hn.replace(/^www\./, '');
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
function renderAdminRules() {
|
||||
const { disabledFeatures: forbid = [] } = popupPanelData;
|
||||
if ( forbid.length === 0 ) { return; }
|
||||
|
|
@ -63,7 +57,7 @@ function setFilteringMode(level, commit = false) {
|
|||
|
||||
async function commitFilteringMode() {
|
||||
if ( tabURL.hostname === '' ) { return; }
|
||||
const targetHostname = normalizedHostname(tabURL.hostname);
|
||||
const targetHostname = tabURL.hostname;
|
||||
const modeSlider = qs$('.filteringModeSlider');
|
||||
const afterLevel = parseInt(modeSlider.dataset.level, 10);
|
||||
const beforeLevel = parseInt(modeSlider.dataset.levelBefore, 10);
|
||||
|
|
@ -314,7 +308,6 @@ async function init() {
|
|||
const response = await sendMessage({
|
||||
what: 'popupPanelData',
|
||||
origin: url.origin,
|
||||
normalHostname: normalizedHostname(tabURL.hostname),
|
||||
hostname: tabURL.hostname,
|
||||
});
|
||||
if ( response instanceof Object ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue