Use IE developer tools to find the class which represents the ECB menu. I don't have SP 2010 VM right now, but attached is the screen shot of SP 2013:
Now, place content editor web part on the page. Add the JSOM script to determine if current user is site admin and based on the result hide the ECB menu class.
var context;
var web;
var isAdmin = false;
function CheckUserPermissions() {
context = new SP.ClientContext.get_current();
web = context.get_web();
context.load(web, 'EffectiveBasePermissions');
context.executeQueryAsync(onSuccess, onFailure);
}
function onSuccess() {
if (web.get_effectiveBasePermissions().has(SP.PermissionKind.manageWeb)) {
isAdmin = true;
}
}
function onFailure(sender, args) {
alert('request failed ' + args.get_message() + 'n' + args.get_stackTrace());
}
Or use this:
function isCurrentUserSiteAdmin(OnSuccess,OnError)
{
var context = SP.ClientContext.get_current();
var list = context.get_web().get_siteUserInfoList();
var userItem = list.getItemById(_spPageContextInfo.userId);
context.load(userItem);
context.executeQueryAsync(
function() {
var isSiteAdmin = userItem.get_item('IsSiteAdmin');
OnSuccess(isSiteAdmin);
},
OnError
);
}
Source: http://sharepoint.stackexchange.com/questions/89604/check-an-admin-account-only-using-javascript
Use JQuery to show/hide the ECB menu:
$(".ms-list-itemLink").css("visibility", "visible");