to the google ad code to make the ads open in a new window , or is it a violation of google TOS? Did someone ask the google team about this before, guys? or you just consider it illegal since it's playing with the code?
You can't add it because you don't control the HTML of the ads. But even if you could, it would be against their terms of service. https://www.google.com/adsense/policies