Heh, if that works, guess one could sue Google for putting their analytics on many websites. See, those bastards unauthorizedly run their software on my machine, and it even spies on me, reporting on my browsing habits! /jk
The EU cookie case is indeed an excellent parallel - cookies are so thoroughly entrenched into the business models of the web that all that's been accomplished is the more compliant websites throw up a big annoying banner you must dismiss. If you try to hamstring javascript the same way, the shady websites that actually run the stuff you want to worry about will take no notice. And the nice websites will explode with infinite regress trying to figure out how to obtain consent to run their cookie banner javascript...