How can I override javascript files referenced with the crossorigin=“anonymous” using a Google Chrome extension?
问题 In the response HTML of a website, with a domain like http://www.example.com , there are many javascript files referenced. One of them references a javascript file on a different domain, and this script tag has the crossorigin="anonymous" attribute set: <script crossorigin="anonymous" src="//cdn.example.net/script.js"></script> I've attempted to redirect the request to another url using a Google Chrome extension: chrome.webRequest.onBeforeRequest.addListener(function(info) { return {