Premise: I\'ve found these two answers but I don\'t understand how I can sistematically apply it for many libraries:
Detect and log when external Ja
Just add an onerror handler to the tag. This can call a fallback, give the user a message etc.
Using a non-existing url will here pop up an alert:
For custom function, just define a script block in the header before the link tags so you can call a custom function: