x x x
x
Only portrait mode is currently supported - please rotate your device.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTML
<script>
// REPLACING ALL THE AUTOMATICALLY-GENERATED PROFILE LINKS IN MENTORS SEARCH POPUP WITH PROFILE LINKS:
const replacePopupLinks = () => {
  let links = Array.from(document.getElementById("custom-user-search-results-dialog").getElementsByTagName("A"));
  links.forEach(link => {
    if (link.href.includes('/display/~')) {
      let email = link.href.split('/display/~').pop();
      link.href = '/display/MSPEOPMSCOM/BioCompany+ProfilePage?mentorcompany=' + email;
    }})
}

const popupReadyPolling = () => {
  if (document.getElementById("custom-user-search-results-dialog")) {
    replacePopupLinks();
  } else {
    setTimeout(popupReadyPolling, 200);
  }
}

// Set the polling function to start when page is done loading: 
window.addEventListener('DOMContentLoaded', () => {
	var searchBars = document.getElementsByClassName("custom-user-search-form");
	for(var i = 0; i < searchBars.length; i++) {
    	searchBars[i].addEventListener("submit", popupReadyPolling)
	}
});

</script>

...