You may be trying to access this site from a secured browser on the server. Please enable scripts and reload this page.
How to add a 'Open PDF in Browser' menu Item.
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.
I dug around in core.js found some useful functions including:
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.