Add workaround for the issue with links

Links added by the extension to the Community Console recently started
being handled by the Community Console to load the view dynamically
instead of reloading the whole page. However, this introduced a bug for
links pointing to Community Console search pages, which sometimes took a
long time to load (see linked bug).

This change works around this issue by making the Console Community not
handle these link clicks, so they continue to work like before when
clicked (the page is loaded from scratch to show the search results).

Bug: twpowertools:77
Change-Id: Iaec85ba58ea8006fe18939fbd72bd6ad70382c97
diff --git a/src/contentScripts/utilsCommon/unifiedProfiles.js b/src/contentScripts/utilsCommon/unifiedProfiles.js
index 82bc9c3..e1ba59f 100644
--- a/src/contentScripts/utilsCommon/unifiedProfiles.js
+++ b/src/contentScripts/utilsCommon/unifiedProfiles.js
@@ -1,5 +1,6 @@
 import {MDCTooltip} from '@material/tooltip';
 
+import {createImmuneLink} from '../../common/commonUtils.js';
 import {escapeUsername} from '../../common/communityConsoleUtils.js';
 import {isOptionEnabled} from '../../common/optionsUtils.js';
 import {createPlainTooltip} from '../../common/tooltip.js';
@@ -30,7 +31,7 @@
   var links = document.createElement('div');
   links.classList.add('TWPT-user-profile__user-links');
 
-  var a = document.createElement('a');
+  var a = isCommunityConsole ? createImmuneLink() : document.createElement('a');
   a.classList.add('TWPT-user-profile__user-link', 'TWPT-user-link');
   a.href = url;
   a.target = '_parent';