diff --git a/src/common/forum.css b/src/common/forum.css
index 7e862fd..90a64aa 100644
--- a/src/common/forum.css
+++ b/src/common/forum.css
@@ -23,6 +23,11 @@
   filter: invert(1);
 }
 
-.user-profile__user-link.TWPT-user-link > * {
+.TWPT-user-profile__user-links {
+  margin-top: 8px;
+}
+
+.user-profile__user-link.TWPT-user-link > *,
+    .TWPT-user-profile__user-link.TWPT-user-link > * {
   vertical-align: middle;
 }
diff --git a/src/content_scripts/profile_inject.js b/src/content_scripts/profile_inject.js
index c7b04b1..dd5e68f 100644
--- a/src/content_scripts/profile_inject.js
+++ b/src/content_scripts/profile_inject.js
@@ -1,8 +1,66 @@
 var authuser = (new URL(location.href)).searchParams.get('authuser') || '0';
 
-chrome.storage.sync.get(null, function(items) {
-  if (items.history &&
-      document.querySelector('.user-profile__user-links') === null) {
+function getSearchUrl(query) {
+  var urlpart = encodeURIComponent('query=' + encodeURIComponent(query));
+  var authuserpart =
+      (authuser == '0' ? '' : '?authuser=' + encodeURIComponent(authuser));
+  return url = '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.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);
+}
+
+function injectPreviousPostsLinksOldProfile() {
+  if (document.querySelector('.user-profile__user-links') === null) {
     var nameElement = document.querySelector('.user-profile__user-name');
     if (nameElement !== null) {
       var profileLink = document.querySelector('.community-console');
@@ -24,11 +82,7 @@
       var name = escapeUsername(nameElement.textContent);
       var filter =
           '(creator:"' + name + '" | replier:"' + name + '") forum:' + forumId;
-      var urlpart = encodeURIComponent('query=' + encodeURIComponent(filter));
-      var authuserpart =
-          (authuser == '0' ? '' : '?authuser=' + encodeURIComponent(authuser));
-      var url = 'https://support.google.com/s/community/search/' + urlpart +
-          authuserpart;
+      var url = getSearchUrl(filter);
 
       var links = document.createElement('div');
       links.classList.add('user-profile__user-links');
@@ -78,4 +132,13 @@
       console.error('[previousposts] Can\'t find username.');
     }
   }
+}
+
+chrome.storage.sync.get(null, function(items) {
+  if (items.history) {
+    if (document.getElementById('unified-user-profile') !== null)
+      injectPreviousPostsLinksUnifiedProfile();
+    else
+      injectPreviousPostsLinksOldProfile();
+  }
 });
diff --git a/templates/manifest.gjson b/templates/manifest.gjson
index 266ec60..e643604 100644
--- a/templates/manifest.gjson
+++ b/templates/manifest.gjson
@@ -42,7 +42,7 @@
       "js": ["common/content_scripts.js", "common/cs_event_listener.js", "content_scripts/profileindicator_inject.js"]
     },
     {
-      "matches": ["https://support.google.com/*/profile/*"],
+      "matches": ["https://support.google.com/*/profile/*", "https://support.google.com/profile/*"],
       "js": ["common/content_scripts.js", "content_scripts/profile_inject.js"],
       "css": ["common/forum.css"]
     }
