Skip Navigation LinksPDF-CustomOpenMenu

 
MenuItem.PNG

 
 
The Sharepoint AddDocLibMenuItems() Function in Core.js always executes Custom_AddDocLibMenuItems if a function by that name exists.  So to add menu items to a library all you have to do is put this code in a text file on your site then add the script to your Doc Lib View (AllItems.aspx for example) using a Content Editor Web Part.
 
MenuJS.PNG

I dug around in core.js found some useful functions including:
 
FindSTSMenuTable(sourceElement, Attribute) which seems to find the List View Items Table of a given source element by climbing up the DOM until it finds a tag with the given attribute name.  I used this to get to the first <a> link href which is the Relative URL of the PDF Document.

‚Äč

SharePoint Help  
Looking for recommendations...

How to

There is no recommended article for this page. Try searching help and community.
This shouldn't take long.

Community

Can't find what you are looking for? Post your question to the Office 365 Community
Sorry, we couldn't find an answer. Post your question to the Office 365 Community
Sorry, the help service is down, but you can find answers at Office support