ghostery / adblocker

Efficient embeddable adblocker library
https://www.ghostery.com
Mozilla Public License 2.0
804 stars 101 forks source link

An innocent file was blocked, why? #4391

Closed SuiKaSan closed 1 week ago

SuiKaSan commented 1 week ago

One of the js file in my local website was blocked by this extension. The whole file as followed.

export const Thermostat = {
    template: `
        <div class="card">
            <div class="card-header">
                <span>{{title}}</span>
                <el-switch
                    v-model="switchValue"
                    inactive-color="#cccc"
                    @change="changeSwitch"
                >
                </el-switch>
            </div>
            <el-select :disabled="false" v-model="trvModelValue" class="power-select" v-if="switchValue" @change="changeSelect">
                <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                >
                </el-option>
            </el-select>
        </div>
    `,
    props: ['nodeRed', 'state', 'deviceData'],
    data() {
        return {
            title: this.nodeRed._('control-device.label.thermostat'),
            options: [
                {
                    value: 'MANUAL',
                    label: this.nodeRed._('control-device.SelectOption.manual_mode'),
                },
                {
                    value: 'AUTO',
                    label: this.nodeRed._('control-device.SelectOption.auto_mode'),
                },
                {
                    value: 'ECO',
                    label: this.nodeRed._('control-device.SelectOption.forst_protection'),
                },
            ],
            trvModelValue: '',
            switchValue: false,
            defaultValue:'MANUAL'
        };
    },
    watch:{
        state: {
            handler(newVal) {
                if (Object.keys(newVal).length === 0){
                    this.reset();
                }
            },
            immediate: true,
            deep: true,
        },
    },
    methods: {
        callBack(state, deleteFlag) {
            const data = {
                thermostat: {
                    'thermostat-mode': {
                        thermostatMode: state
                    },
                },
            };
            this.$emit('call-back', data, deleteFlag);
        },
        changeSwitch(value) {
            this.trvModelValue = this.defaultValue;
            this.callBack(this.defaultValue, !value);
            if(!value)this.$emit('call-back', { 'thermostat-target-setpoint': { 'manual-mode': {} }}, true);
        },
        changeSelect(value) {
            this.callBack(value, false);
            if(['AUTO','ECO'].includes(value)){
                this.$emit('call-back', { 'thermostat-target-setpoint': { 'manual-mode': {} }}, true);
            }
        },
        reset(){
            this.switchValue = false;
            this.trvModelValue = this.defaultValue;
        }
    },
    mounted() {
        const trvMode = _.get(this.state,['thermostat', 'thermostat-mode','thermostatMode'],'');
        if (trvMode) {
            this.switchValue = true;
            this.trvModelValue = trvMode;
        }
    },
};

Can any one tell me what's wrong with the file and how to fix it?

seia-soto commented 1 week ago

Hello @SuiKaSan ,

Sorry for the inconvenient using Ghostery Browser Extension.

This repository only contains source codes of ad-blocker engine which is responsible for blocking and injecting resources under the hood. The filters (we do call the list of entries describing what to block and allow) are not the case of adblocker engine.

What you'd like to see is probably ghostery/broken-page-reports: https://github.com/ghostery/broken-page-reports . If you file an issue there, I'll take a look and try to fix the issue. Note that it normally takes up to a day for a fix to be deployed.

Best

SuiKaSan commented 1 week ago

It's a local page. I can't provide any website url. Can you please fine anyone can take a look for me?

seia-soto commented 1 week ago

@SuiKaSan I'm responsible for fixing those cases. Unfortunately, we need to know the full information on the webpage to see what's actually happening. Please, file an issue without URL: you can fill it with anything: e.g. intranet.

We'll require the following information for your website:

Since no one can access your website, we'll try to solve the problem by deploying experimental fixes.

SuiKaSan commented 1 week ago

Thanks. I'm filing an issue now.