Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

Note Board–Comment on external sites

While reviewing the new social features I noticed this interesting hyperlink on the “My Profile” page.   It allows users to bookmark a special link which they can use to extend “I like It” and “Tags & Notes” features beyond SharePoint to comment on external websites.

I was curious to look under the hood and understand how this could be done technically.

A complete JavaScript function is added to your bookmark in the URL field and executes when clicked.   The browser context holds the external site’s detail and is passed to SharePoint as GET parameter in the URL.   There is a safety check for SharePoint sites.   If the dialog function exists (CORE.JS) then we can assume we are on a SharePoint page and display the dialog instead of a full page.

The special character escaping is very clever and gives us a single line of text which JavaScript can execute.

 

image
image

ORIGINAL

SPACED FOR EASY READING

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲