How to inject javascript into Chrome DevTools itself

Usually, you cannot create a Chrome extension which injects code in a devtools page. The “Discover DevTools Companion” extension from now on, referred to as DDC is allowed to do this, because this extension is whitelisted in the source code of Chromium: (this is no longer the case) // Whitelist “Discover DevTools Companion” extension from … Read more

How do you integrate Universal Analytics in to Chrome Extensions?

There’s an issue for that on Google code: The solution is to pass analytics your own protocol check function or simply null for no checking, in an official way. This has to come after ga(‘create’, …) : ga(‘set’, ‘checkProtocolTask’, null); // Disable file protocol checking. So you don’t need to modify the original analytics.js script. … Read more

Registering a custom element from a chrome extension

For me it was sufficient to use @webcomponents/custom-elements package in my content.js. Also webcomponents-sd-ce.js weights about 80kb and custom-elements.min.js only 16kb. Just install it as a dependancy and import it in the content.js and let your package manager do the rest. npm i @webcomponents/custom-elements import ‘@webcomponents/custom-elements’ This is how I use it in my project … Read more