Customizing Context Menu in Sharepoint
It’s been a while and I remember there are a number of ways to do this. This is the simple one…
The context menu itself is a JavaScript program and you can found it at \Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\LAYOUTS\1033\ows.js
There’s a script that out-of-the-box available to check whether there’s a customization applied.
if (typeof(Custom_AddDocLibMenuItems) != “undefined”)
{
if (Custom_AddDocLibMenuItems(m, ctx))
return;
}