tor-browser

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

bug1724868-news.yahoo.co.jp-ua-override.js (888B)


      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 1724868 - news.yahoo.co.jp - Override UA on Android and Linux
      9 * WebCompat issue #82605 - https://webcompat.com/issues/82605
     10 *
     11 * Yahoo Japan news doesn't allow playing video in Firefox on Android or Linux
     12 * as those are not in their support matrix. They check UA override twice
     13 * and display different UI with the same error. Changing the UA to Chrome via
     14 * content script allows playing the videos.
     15 */
     16 
     17 /* globals exportFunction, UAHelpers */
     18 
     19 console.info(
     20  "The user agent has been overridden for compatibility reasons. See https://webcompat.com/issues/82605 for details."
     21 );
     22 
     23 UAHelpers.overrideWithDeviceAppropriateChromeUA({ OS: "nonLinux" });