I need to do some client-side alterations to some of the application pages, specifically the permission page (User.aspx). I need the javascript file to remove the "Administrate Parent Permissions" link as a lot of human errors occur because of this.
However, I have found no easy way to 1) put javascript into a master page (and I don't want to edit application.master manually), or 2) dynamically load a javascript on the application.master pages.
The solution is already making use of a custom master page for normal pages that already have scripts included, but this is specifically for application pages only (to the extent possible).
I saw a solution using a HttpModule to dynamically replace the master file on-the-fly, but it seems like a very inefficient way to do it.
Any suggestions are welcome. The end result must just be that the specific menu item is removed from the actions menu on the permissions page. I have tried using HideCustomAction, but it will not work for that specific menu item (it is working fine for others).