Bug 1484796 - Add console logging statements to site patches. r=kmag,rhelmer
authorDennis Schubert <dschubert@mozilla.com>
Tue, 21 Aug 2018 16:10:23 +0000
changeset 487769 9bf437ef1af2a65aa5fe4384a37f4e066d9c66ac
parent 487768 0d5e2c4f446b8302528f0c9e42794ea5111f89a2
child 487770 568230ce860e86538ee9d567fdd6fcec46142c8d
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag, rhelmer
bugs1484796
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1484796 - Add console logging statements to site patches. r=kmag,rhelmer Differential Revision: https://phabricator.services.mozilla.com/D3818
browser/extensions/webcompat/webextension/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js
browser/extensions/webcompat/webextension/injections/js/bug1457335-histography.io-ua-change.js
browser/extensions/webcompat/webextension/injections/js/bug1472075-bankofamerica.com-ua-change.js
browser/extensions/webcompat/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
browser/extensions/webcompat/webextension/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js
mobile/android/extensions/webcompat/webextension/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js
mobile/android/extensions/webcompat/webextension/injections/js/bug1457335-histography.io-ua-change.js
mobile/android/extensions/webcompat/webextension/injections/js/bug1472075-bankofamerica.com-ua-change.js
mobile/android/extensions/webcompat/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
mobile/android/extensions/webcompat/webextension/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js
--- a/browser/extensions/webcompat/webextension/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js
+++ b/browser/extensions/webcompat/webextension/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js
@@ -11,15 +11,17 @@
  * unsuppored" error message.
  *
  * This site patch simply sets window.controllers to a string, resulting in
  * their check to work again.
  */
 
 /* globals exportFunction */
 
+console.info("window.controllers has been shimmed for compatibility reasons. See https://webcompat.com/issues/16401 for details.");
+
 Object.defineProperty(window.wrappedJSObject, "controllers", {
   get: exportFunction(function() {
-    return "window.controllers has been shimmed with a string to get this site's browser detection to work in Firefox 61+.";
+    return true;
   }, window),
 
   set: exportFunction(function() {}, window)
 });
--- a/browser/extensions/webcompat/webextension/injections/js/bug1457335-histography.io-ua-change.js
+++ b/browser/extensions/webcompat/webextension/injections/js/bug1457335-histography.io-ua-change.js
@@ -6,16 +6,18 @@
  *
  * This site is using a strict matching of navigator.userAgent and
  * navigator.vendor to allow access for Safari or Chrome. Here, we set the
  * values appropriately so we get recognized as Chrome.
  */
 
 /* globals exportFunction */
 
+console.info("The user agent has been overridden for compatibility reasons. See https://webcompat.com/issues/1804 for details.");
+
 const CHROME_UA = navigator.userAgent + " Chrome for WebCompat";
 
 Object.defineProperty(window.navigator.wrappedJSObject, "userAgent", {
   get: exportFunction(function() {
     return CHROME_UA;
   }, window),
 
   set: exportFunction(function() {}, window)
--- a/browser/extensions/webcompat/webextension/injections/js/bug1472075-bankofamerica.com-ua-change.js
+++ b/browser/extensions/webcompat/webextension/injections/js/bug1472075-bankofamerica.com-ua-change.js
@@ -8,16 +8,18 @@
  * Windows users without warning. From our side, there is no difference here
  * and we receive a lot of user complains about the warnings, so we spoof
  * as Firefox on Windows in those cases.
  */
 
 /* globals exportFunction */
 
 if (!navigator.platform.includes("Win")) {
+  console.info("The user agent has been overridden for compatibility reasons. See https://webcompat.com/issues/2787 for details.");
+
   const WINDOWS_UA = navigator.userAgent.replace(/\(.*; rv:/i, "(Windows NT 10.0; Win64; x64; rv:");
 
   Object.defineProperty(window.navigator.wrappedJSObject, "userAgent", {
     get: exportFunction(function() {
       return WINDOWS_UA;
     }, window),
 
     set: exportFunction(function() {}, window)
--- a/browser/extensions/webcompat/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
+++ b/browser/extensions/webcompat/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
@@ -7,15 +7,17 @@
  * This site is blocking onmousedown and onclick if window.sidebar is something
  * that evaluates to true, rendering the form fields unusable. This patch
  * overrides window.sidebar with false, so the blocking event handlers won't
  * get registered.
  */
 
 /* globals exportFunction */
 
+console.info("window.sidebar has been shimmed for compatibility reasons. See https://webcompat.com/issues/11622 for details.");
+
 Object.defineProperty(window.wrappedJSObject, "sidebar", {
   get: exportFunction(function() {
     return false;
   }, window),
 
   set: exportFunction(function() {}, window)
 });
--- a/browser/extensions/webcompat/webextension/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js
+++ b/browser/extensions/webcompat/webextension/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js
@@ -7,15 +7,17 @@
  * This site is blocking onmousedown and onclick if window.sidebar is something
  * that evaluates to true, rendering the login unusable. This patch overrides
  * window.sidebar with false, so the blocking event handlers won't get
  * registered.
  */
 
 /* globals exportFunction */
 
+console.info("window.sidebar has been shimmed for compatibility reasons. See https://webcompat.com/issues/18143 for details.");
+
 Object.defineProperty(window.wrappedJSObject, "sidebar", {
   get: exportFunction(function() {
     return false;
   }, window),
 
   set: exportFunction(function() {}, window)
 });
--- a/mobile/android/extensions/webcompat/webextension/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js
+++ b/mobile/android/extensions/webcompat/webextension/injections/js/bug1452707-window.controllers-shim-ib.absa.co.za.js
@@ -11,15 +11,17 @@
  * unsuppored" error message.
  *
  * This site patch simply sets window.controllers to a string, resulting in
  * their check to work again.
  */
 
 /* globals exportFunction */
 
+console.info("window.controllers has been shimmed for compatibility reasons. See https://webcompat.com/issues/16401 for details.");
+
 Object.defineProperty(window.wrappedJSObject, "controllers", {
   get: exportFunction(function() {
-    return "window.controllers has been shimmed with a string to get this site's browser detection to work in Firefox 61+.";
+    return true;
   }, window),
 
   set: exportFunction(function() {}, window)
 });
--- a/mobile/android/extensions/webcompat/webextension/injections/js/bug1457335-histography.io-ua-change.js
+++ b/mobile/android/extensions/webcompat/webextension/injections/js/bug1457335-histography.io-ua-change.js
@@ -6,16 +6,18 @@
  *
  * This site is using a strict matching of navigator.userAgent and
  * navigator.vendor to allow access for Safari or Chrome. Here, we set the
  * values appropriately so we get recognized as Chrome.
  */
 
 /* globals exportFunction */
 
+console.info("The user agent has been overridden for compatibility reasons. See https://webcompat.com/issues/1804 for details.");
+
 const CHROME_UA = navigator.userAgent + " Chrome for WebCompat";
 
 Object.defineProperty(window.navigator.wrappedJSObject, "userAgent", {
   get: exportFunction(function() {
     return CHROME_UA;
   }, window),
 
   set: exportFunction(function() {}, window)
--- a/mobile/android/extensions/webcompat/webextension/injections/js/bug1472075-bankofamerica.com-ua-change.js
+++ b/mobile/android/extensions/webcompat/webextension/injections/js/bug1472075-bankofamerica.com-ua-change.js
@@ -8,16 +8,18 @@
  * Windows users without warning. From our side, there is no difference here
  * and we receive a lot of user complains about the warnings, so we spoof
  * as Firefox on Windows in those cases.
  */
 
 /* globals exportFunction */
 
 if (!navigator.platform.includes("Win")) {
+  console.info("The user agent has been overridden for compatibility reasons. See https://webcompat.com/issues/2787 for details.");
+
   const WINDOWS_UA = navigator.userAgent.replace(/\(.*; rv:/i, "(Windows NT 10.0; Win64; x64; rv:");
 
   Object.defineProperty(window.navigator.wrappedJSObject, "userAgent", {
     get: exportFunction(function() {
       return WINDOWS_UA;
     }, window),
 
     set: exportFunction(function() {}, window)
--- a/mobile/android/extensions/webcompat/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
+++ b/mobile/android/extensions/webcompat/webextension/injections/js/bug1472081-election.gov.np-window.sidebar-shim.js
@@ -7,15 +7,17 @@
  * This site is blocking onmousedown and onclick if window.sidebar is something
  * that evaluates to true, rendering the form fields unusable. This patch
  * overrides window.sidebar with false, so the blocking event handlers won't
  * get registered.
  */
 
 /* globals exportFunction */
 
+console.info("window.sidebar has been shimmed for compatibility reasons. See https://webcompat.com/issues/11622 for details.");
+
 Object.defineProperty(window.wrappedJSObject, "sidebar", {
   get: exportFunction(function() {
     return false;
   }, window),
 
   set: exportFunction(function() {}, window)
 });
--- a/mobile/android/extensions/webcompat/webextension/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js
+++ b/mobile/android/extensions/webcompat/webextension/injections/js/bug1482066-portalminasnet.com-window.sidebar-shim.js
@@ -7,15 +7,17 @@
  * This site is blocking onmousedown and onclick if window.sidebar is something
  * that evaluates to true, rendering the login unusable. This patch overrides
  * window.sidebar with false, so the blocking event handlers won't get
  * registered.
  */
 
 /* globals exportFunction */
 
+console.info("window.sidebar has been shimmed for compatibility reasons. See https://webcompat.com/issues/18143 for details.");
+
 Object.defineProperty(window.wrappedJSObject, "sidebar", {
   get: exportFunction(function() {
     return false;
   }, window),
 
   set: exportFunction(function() {}, window)
 });