tor-browser

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

commit 42ab0d4845e907a4b4fce78340e708c316bc6ab7
parent 245b9eb378e0b5041242b522056a3b169e7fa90f
Author: Thomas Wisniewski <twisniewski@mozilla.com>
Date:   Wed, 26 Nov 2025 23:06:58 +0000

Bug 1895997 - update our webcompat intervention for e.seb.lt; r=ksenia,webcompat-reviewers

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

Diffstat:
Mbrowser/extensions/webcompat/data/interventions.json | 6++----
Dbrowser/extensions/webcompat/injections/js/bug1895997-e.seb.lt-prevent-unsupported-warning.js | 35-----------------------------------
Mtesting/webcompat/interventions/tests/test_1895997_e_seb_lt.py | 7+++----
3 files changed, 5 insertions(+), 43 deletions(-)

diff --git a/browser/extensions/webcompat/data/interventions.json b/browser/extensions/webcompat/data/interventions.json @@ -1906,15 +1906,13 @@ "bugs": { "1895997": { "issue": "unsupported-warning", - "matches": ["*://e.seb.lt/ib/login*"] + "matches": ["*://login.seb.lt/ui/*"] } }, "interventions": [ { "platforms": ["all"], - "content_scripts": { - "js": ["bug1895997-e.seb.lt-prevent-unsupported-warning.js"] - } + "ua_string": ["add_Chrome"] } ] }, diff --git a/browser/extensions/webcompat/injections/js/bug1895997-e.seb.lt-prevent-unsupported-warning.js b/browser/extensions/webcompat/injections/js/bug1895997-e.seb.lt-prevent-unsupported-warning.js @@ -1,35 +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/. */ - -/* globals exportFunction */ - -"use strict"; - -/** - * e.seb.lt - Recommends Chrome on login page. - * Bug #1895997 - https://bugzilla.mozilla.org/show_bug.cgi?id=1895997 - * WebCompat issue #136596 - https://webcompat.com/issues/136596 - * - * We can automatically hide the message for users. - */ - -new MutationObserver(mutations => { - for (let { addedNodes } of mutations) { - for (const node of addedNodes) { - try { - if ( - node.matches( - ".login__container > .ng-star-inserted > .ng-star-inserted" - ) && - node.innerText.includes("Chrome") - ) { - node.remove(); - } - } catch (_) {} - } - } -}).observe(document.documentElement, { - childList: true, - subtree: true, -}); diff --git a/testing/webcompat/interventions/tests/test_1895997_e_seb_lt.py b/testing/webcompat/interventions/tests/test_1895997_e_seb_lt.py @@ -1,8 +1,8 @@ import pytest -URL = "https://e.seb.lt/ib/login" +URL = "https://login.seb.lt/ui/" -COOKIES_CSS = "#cookie-consent-accept-all-btn" +HERO_CSS = "#userId" UNSUPPORTED_TEXT = "Google Chrome" @@ -10,8 +10,8 @@ UNSUPPORTED_TEXT = "Google Chrome" @pytest.mark.with_interventions async def test_enabled(client): await client.navigate(URL) - client.click(client.await_css(COOKIES_CSS, is_displayed=True)) await client.stall(3) + client.await_css(HERO_CSS, is_displayed=True) assert not client.find_text(UNSUPPORTED_TEXT, is_displayed=True) @@ -19,5 +19,4 @@ async def test_enabled(client): @pytest.mark.without_interventions async def test_disabled(client): await client.navigate(URL) - client.click(client.await_css(COOKIES_CSS, is_displayed=True)) assert client.await_text(UNSUPPORTED_TEXT, is_displayed=True)