daily pastebin goal
15%
SHARE
TWEET

Jive - Make User Profile Link

cb_ddewald Aug 11th, 2016 (edited) 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div class="welcome-text">
  2.     <p><a href="#" id="editProfile">Edit your profile</a></p>
  3. </div>
  4. <script>
  5.     // get username
  6.     var userName = window.top._jive_current_user.username;
  7.     // build the URL
  8.     var profileURL =  window.top.location.protocol + "//" + window.top.location.hostname + "/people/" + userName;
  9.     // update link
  10.     document.getElementById("editProfile").href = profileURL;
  11. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top