diff --git a/manifest.json b/manifest.json index f05016f..da6b737 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "post-zen", "author": "Brandon Castillo, Marketing Engineering, Postman.", - "version": "1.8.0", + "version": "1.9.0", "api_version": 2, "default_locale": "en-us", "settings": [ diff --git a/script.js b/script.js index 10a482f..17957c9 100644 --- a/script.js +++ b/script.js @@ -696,6 +696,31 @@ if (window.location.href.includes("support.postman.com/hc/en-us")) { }); } +function getCookie(cname) { + let name = cname + "="; + let decodedCookie = decodeURIComponent(document.cookie); + let ca = decodedCookie.split(';'); + for(let i = 0; i { + let profile = document.getElementById("pm-signed-in"); + const isSignedIn = getCookie("ajs_user_id"); + isSignedIn ? profile.setAttribute("href", `/hc/en-us/profiles/${isSignedIn}`) : profile.setAttribute("href", `/hc/en-us/profiles/shared`) + }, 500) + +}()) + jQuery(document).ready(function () { /* pmtSDK diff --git a/templates/header.hbs b/templates/header.hbs index 438e27c..df3636a 100644 --- a/templates/header.hbs +++ b/templates/header.hbs @@ -250,7 +250,7 @@ {{/unless}} {{#if signed_in}}