Closed Bug 1731935 Opened 3 years ago Closed 3 years ago

Change frontgate override to content script instead of the header

Categories

(Web Compatibility :: Interventions, enhancement)

Firefox 94
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ksenia, Unassigned)

References

()

Details

We need to change the existing intervention for https://www.frontgate.com to be in the content script instead of headers.

Also, the match for the url should account for www, so it needs to be changed to "*://*.frontgate.com/*".

More information:
There is the following code that's detecting whether a user receives mobile layout:

(function() {
...
    Mobify.Tag.init({
        mode: function(o) {
            return /^((?!windows\sphone).)*(ip(hone|od)|android.*(mobile)(?!.*firefox))/i.test(o) ? "enabled" : "desktop"
        },
...
}
)();

where o is window.navigator.userAgent, so the current UA override in the headers doesn't work.

The intervention is shipping with the Interventions Addon v27.0.0 in Firefox 94.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.