refactor: change info logs to debug or warning
This CL converts some info-level messages to the debug level because
they're irrelevant and shouldn't be shown by default in the Javascript
console.
Also, one info-level message has been converted to a warning because it
represents a situation that couldn't be handled by the extension which
causes the feature to behave in an unexpected manner.
Change-Id: If1a153320c502bd5a2805597c8558456039a89a1
diff --git a/src/contentScripts/communityConsole/unifiedProfiles.js b/src/contentScripts/communityConsole/unifiedProfiles.js
index e37fbbf..a26c45b 100644
--- a/src/contentScripts/communityConsole/unifiedProfiles.js
+++ b/src/contentScripts/communityConsole/unifiedProfiles.js
@@ -4,7 +4,7 @@
return srcRegex.test(iframe.src ?? '');
},
fixIframe(iframe) {
- console.info('[unifiedProfilesFix] Fixing unified profiles iframe');
+ console.debug('[unifiedProfilesFix] Fixing unified profiles iframe');
var url = new URL(iframe.src);
url.searchParams.set('dark', 1);
iframe.src = url.href;
diff --git a/src/contentScripts/communityConsole/workflows/import.js b/src/contentScripts/communityConsole/workflows/import.js
index 8172b62..c91b541 100644
--- a/src/contentScripts/communityConsole/workflows/import.js
+++ b/src/contentScripts/communityConsole/workflows/import.js
@@ -76,7 +76,7 @@
// If another CR has the same name, there's no easy way to distinguish
// them, so don't inject the button.
if (crs.duplicateNames.has(name)) {
- console.info(
+ console.warning(
'CR "' + name +
'" is duplicate, so skipping the injection of the button.');
return;
diff --git a/src/injections/profileIndicator.js b/src/injections/profileIndicator.js
index f82737c..8e6344c 100644
--- a/src/injections/profileIndicator.js
+++ b/src/injections/profileIndicator.js
@@ -417,7 +417,7 @@
for (const linkType of CC_PROFILE_LINK_TYPES) {
if (node.matches(linkType.nodeSelector)) {
- console.info('Handling profile indicator via mutation callback.');
+ console.debug('Handling profile indicator via mutation callback.');
getOptionsAndHandleIndicators(node, linkType.ui);
break;
}
@@ -436,7 +436,7 @@
for (const linkType of CC_PROFILE_LINK_TYPES) {
let node = document.querySelector(linkType.nodeSelector);
if (node !== null) {
- console.info('Handling profile indicator via first check.');
+ console.debug('Handling profile indicator via first check.');
getOptionsAndHandleIndicators(node, linkType.ui);
break;
}
diff --git a/src/xhrInterceptor/responseModifiers/index.js b/src/xhrInterceptor/responseModifiers/index.js
index 0b349bd..057960f 100644
--- a/src/xhrInterceptor/responseModifiers/index.js
+++ b/src/xhrInterceptor/responseModifiers/index.js
@@ -45,7 +45,7 @@
// #!if !production
if (Object.keys(featuresAreEnabled).length > 0) {
- console.info(
+ console.debug(
'[XHR Interceptor - Response Modifier] Requested features',
featuresAreEnabled, 'for request', request.$TWPTRequestURL);
}