tor-browser

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

1997575-perplexity.ai-covered-fixed-element.js (930B)


      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 "use strict";
      6 
      7 /**
      8 * Bug 1997575 - Perplexity toolbar hides behind the keyboard
      9 *
     10 * Dynamic toolbar in Firefox for Android is covering the input field in Perplexity.
     11 */
     12 
     13 /* globals exportFunction */
     14 
     15 console.info(
     16  "interactive-widget is being applied for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1997575 for details."
     17 );
     18 
     19 document.addEventListener("DOMContentLoaded", () => {
     20  let metaViewport = document.querySelector("meta[name=viewport]");
     21  if (!metaViewport) {
     22    return;
     23  }
     24  let content = metaViewport.content;
     25  if (!content.includes("interactive-widget")) {
     26    metaViewport.setAttribute(
     27      "content",
     28      content + ",interactive-widget=resizes-content"
     29    );
     30  }
     31 });