Others have mentioned NoScript. I find that when NoScript particularly bombs is when the referenced JavaScript domains themselves reference 3rd party domains. I am not update on how JavaScript is dynamically loaded but this is what I have pieced together.
For example, suppose you are using NoScript to view www.somedomain.com. You check the NoScript menu to find and enable www.somedomain.com, www.somedomaincdn.com, and youtube.com. But suppose whatever youtube.com scripting is done, in turn, relies on say www.youtubecdn.com. You are not going to see this "3rd party domain" on the NoScript menu.
I have found by trial and error, mostly just visiting the "2nd party" domains and looking at their dependencies, I can often tell a site owner how to make their site work with NoScript. Basically they just need a reference to the indirect dependency, even though it isn't needed per se.
For example, suppose you are using NoScript to view www.somedomain.com. You check the NoScript menu to find and enable www.somedomain.com, www.somedomaincdn.com, and youtube.com. But suppose whatever youtube.com scripting is done, in turn, relies on say www.youtubecdn.com. You are not going to see this "3rd party domain" on the NoScript menu.
I have found by trial and error, mostly just visiting the "2nd party" domains and looking at their dependencies, I can often tell a site owner how to make their site work with NoScript. Basically they just need a reference to the indirect dependency, even though it isn't needed per se.
Hope this helps someone out there!