tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit e6fec86e66e1a8b8f78a104c1856c8bee967ed19
parent 8dc1e66f6c1f41ccfa978bbd6545693e44c6ae6f
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Wed,  7 Jan 2026 22:31:05 +0000

Bug 1987351 - remove our webcompat intervention for mirage.decart.ai; r=ksenia,webcompat-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D278140

Diffstat:
Mbrowser/extensions/webcompat/data/interventions.json | 18------------------
Dbrowser/extensions/webcompat/injections/js/bug1928941-oasis.decart.ai-window-chrome-shim.js | 21---------------------
Dtesting/webcompat/interventions/tests/test_1987351_mirage_decart_ai.py | 21---------------------
3 files changed, 0 insertions(+), 60 deletions(-)

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -5635,24 +5635,6 @@ } ] }, - "1987351": { - "label": "mirage.decart.ai", - "bugs": { - "1987351": { - "issue": "firefox-blocked-completely", - "matches": ["*://mirage.decart.ai/*"] - } - }, - "interventions": [ - { - "platforms": ["all"], - "content_scripts": { - "js": ["bug1928941-oasis.decart.ai-window-chrome-shim.js"] - }, - "ua_string": ["Chrome", "add_Firefox_as_Gecko"] - } - ] - }, "1989241": { "label": "useinsider.com", "bugs": { diff --git a/browser/extensions/webcompat/injections/js/bug1928941-oasis.decart.ai-window-chrome-shim.js b/browser/extensions/webcompat/injections/js/bug1928941-oasis.decart.ai-window-chrome-shim.js @@ -1,21 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -/** - * Bug 1928941 - UA spoof for oasis.decart.ai - * Bug 1987351 - UA spoof for mirage.decart.ai - * - * These sites are checking for window.chrome, so let's spoof that. - */ - -/* globals exportFunction */ - -const bug = location.origin.includes("mirage.decart.ai") ? 1987351 : 1928941; -console.info( - `window.chrome has been shimmed for compatibility reasons. https://bugzilla.mozilla.org/show_bug.cgi?id=${bug} for details.` -); - -window.wrappedJSObject.chrome = new window.wrappedJSObject.Object(); diff --git a/testing/webcompat/interventions/tests/test_1987351_mirage_decart_ai.py b/testing/webcompat/interventions/tests/test_1987351_mirage_decart_ai.py @@ -1,21 +0,0 @@ -import pytest - -URL = "https://mirage.decart.ai/terms-of-service" - -SUPPORTED_TEXT = "Terms of Service" -UNSUPPORTED_TEXT = "work properly in Firefox" - - -@pytest.mark.asyncio -@pytest.mark.with_interventions -async def test_enabled(client): - await client.navigate(URL) - assert client.await_text(SUPPORTED_TEXT, is_displayed=True) - assert not client.find_text(UNSUPPORTED_TEXT, is_displayed=True) - - -@pytest.mark.asyncio -@pytest.mark.without_interventions -async def test_disabled(client): - await client.navigate(URL) - assert client.await_text(UNSUPPORTED_TEXT, is_displayed=True)