[mv3] Remove hostname normalization regarding filtering mode

Related issue:
https://github.com/uBlockOrigin/uBOL-home/issues/388#issuecomment-3075440422
This commit is contained in:
Raymond Hill 2025-07-18 13:53:01 -04:00
parent e07e7bbd09
commit d7686a815e
No known key found for this signature in database
GPG key ID: 25E1490B761470C2
2 changed files with 2 additions and 9 deletions

View file

@ -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 => {

View file

@ -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 ) {