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/common/commonUtils.js b/src/common/commonUtils.js
index ee31037..814ce29 100644
--- a/src/common/commonUtils.js
+++ b/src/common/commonUtils.js
@@ -15,3 +15,12 @@
 export function isEmpty(obj) {
   return Object.keys(obj).length === 0;
 }
+
+// Create a link element which isn't handled by the Community Console when
+// clicked. This is done by cancelling the event propagation in the beginning of
+// the bubbling phase.
+export function createImmuneLink() {
+  var a = document.createElement('a');
+  a.addEventListener('click', e => e.stopPropagation(), false);
+  return a;
+}