diff --git a/src/contentScripts/profile.js b/src/contentScripts/profile.js
index 49422a5..7bd6916 100644
--- a/src/contentScripts/profile.js
+++ b/src/contentScripts/profile.js
@@ -1,68 +1,9 @@
 import {escapeUsername} from '../common/communityConsoleUtils.js';
 import {getOptions} from '../common/optionsUtils.js';
 
-var authuser = (new URL(location.href)).searchParams.get('authuser') || '0';
+import {getSearchUrl, injectPreviousPostsLinksUnifiedProfile} from './utilsCommon/unifiedProfiles.js';
 
-function getSearchUrl(query) {
-  var urlpart = encodeURIComponent('query=' + encodeURIComponent(query));
-  var authuserpart =
-      (authuser == '0' ? '' : '?authuser=' + encodeURIComponent(authuser));
-  return 'https://support.google.com/s/community/search/' + urlpart +
-      authuserpart;
-}
-
-function injectPreviousPostsLinksUnifiedProfile() {
-  var nameElement =
-      document.querySelector('.scTailwindUser_profileUsercardname');
-  if (nameElement === null) {
-    console.error('[previousposts] Can\'t find username.');
-    return;
-  }
-
-  var name = escapeUsername(nameElement.textContent);
-  var filter = '(creator:"' + name + '" | replier:"' + name + '") forum:any';
-  var url = getSearchUrl(filter);
-
-  var links = document.createElement('div');
-  links.classList.add('TWPT-user-profile__user-links');
-
-  var a = document.createElement('a');
-  a.classList.add('TWPT-user-profile__user-link', 'TWPT-user-link');
-  a.href = url;
-  a.target = '_parent';
-  a.setAttribute(
-      'data-stats-id', 'user-posts-link--tw-power-tools-by-avm99963');
-
-  var badge = document.createElement('span');
-  badge.classList.add('TWPT-badge');
-  badge.setAttribute(
-      'title', chrome.i18n.getMessage('inject_extension_badge_helper', [
-        chrome.i18n.getMessage('appName')
-      ]));
-
-  var badgeImg = document.createElement('img');
-  badgeImg.src =
-      'https://fonts.gstatic.com/s/i/materialicons/repeat/v6/24px.svg';
-
-  badge.appendChild(badgeImg);
-  a.appendChild(badge);
-
-  var span = document.createElement('span');
-  span.textContent = chrome.i18n.getMessage('inject_previousposts');
-
-  a.appendChild(span);
-  links.appendChild(a);
-
-  var userDetailsNode =
-      document.querySelector('.scTailwindUser_profileUsercarddetails');
-  if (userDetailsNode === null) {
-    console.error('[previousposts] Can\'t get user card details div.');
-    return;
-  }
-
-  userDetailsNode.parentNode.insertBefore(links, userDetailsNode.nextSibling);
-}
-
+// TODO(b/twpowertools/80): Remove this code.
 function injectPreviousPostsLinksOldProfile() {
   if (document.querySelector('.user-profile__user-links') === null) {
     var nameElement = document.querySelector('.user-profile__user-name');
@@ -141,7 +82,7 @@
 getOptions('history').then(options => {
   if (options?.history) {
     if (document.getElementById('unified-user-profile') !== null)
-      injectPreviousPostsLinksUnifiedProfile();
+      injectPreviousPostsLinksUnifiedProfile(/* isCommunityConsole = */ false);
     else
       injectPreviousPostsLinksOldProfile();
   }
