tor-browser

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

bug1945019-order.mealkeyway.com-prevent-unsupported-message.js (932B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 /* globals exportFunction */
      6 
      7 "use strict";
      8 
      9 /**
     10 * www.menusifu.com - Shows an 'for a better experience, use Chrome' message.
     11 * Bug #1945019 - https://bugzilla.mozilla.org/show_bug.cgi?id=1945019
     12 *
     13 * We can automatically hide the message for users.
     14 */
     15 
     16 console.info(
     17  "Web compatibility fixes are in effect. See https://bugzilla.mozilla.org/show_bug.cgi?id=1923286 for details."
     18 );
     19 
     20 const timer = setInterval(() => {
     21  for (const node of document.querySelectorAll(
     22    "[class*=customMiniPrompt_customPromptContent]"
     23  )) {
     24    if (node.innerText.includes("Chrome")) {
     25      node.parentElement
     26        .querySelector("[class*=customMiniPrompt_iconAdd]")
     27        ?.click();
     28      clearInterval(timer);
     29    }
     30  }
     31 }, 100);