There are several instances where I want to remove some buttons, inputs, tabs, etc on various screens for non-admin users. For instance, on the Event Search screen in this template
CRM/Event/Form/Search.extra.tpl
I have
<script>
{literal}
//remove smart group creation
CRM.$(function remove_smart_group_creation($) {
$('#task option[value=12]').remove();
});
//remove group add contacts
CRM.$(function remove_group_add_contacts($) {
$('#task option[value=2]').remove();
});
//remove delete participants
CRM.$(function remove_delete_participants($) {
$('#task option[value=4]').remove();
});
</script>
{/literal}
How could I exempt the administrator role?