tor-browser

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

bug1902406-sp.hi.co.kr-window-chrome-shim.js (697B)


      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 1902406 - UA spoof for sp.hi.co.kr
      9 *
     10 * This site is checking for window.chrome, so let's spoof that.
     11 */
     12 
     13 /* globals exportFunction */
     14 
     15 console.info(
     16  "window.chrome has been shimmed for compatibility reasons. See https://bugzilla.mozilla.org/show_bug.cgi?id=1902406 for details."
     17 );
     18 
     19 Object.defineProperty(window.wrappedJSObject, "chrome", {
     20  get: exportFunction(function () {
     21    return true;
     22  }, window),
     23 
     24  set: exportFunction(function () {}, window),
     25 });