Two steps are necessary to achieve this:
2.The custom script file(s) have to be registered to be loaded into the Developer Dashboard page.
Below is a short example, which hides the ULS tab in the Developer Dashboard. This example also shows how to use jquery within the Developer Dashboard.
Register the script files with the Developer Dashboard
Our custom script code requires the jquery library – so we have to register two script files with the developer dashboard. That can be done using the following powershell commands:
$contentSvc = ([Microsoft.SharePoint.Administration.SPWebService]::ContentService)
$DevDashboardSettings = $contentSvc.DeveloperDashboardSettings
$DevDashboardSettings.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
As you can see we are registering two different script files: first the jquery library from an external site and second the script file we created earlier.
The powershell script will also enable the Developer Dashboard by setting the DisplayLevel to on.