MicrosoftEdge-Extensions-Demos
MicrosoftEdge-Extensions-Demos copied to clipboard
Color-changer example does not change the color
Everything works but the color change itself (inserting the css).
Microsoft Edge 42.17134.1.0 Microsoft EdgeHTML 17.17134
I'm having the same problem: the extension loads successfully, but the buttons don't seem to do anything. I've tried changing the CSS selectors in the click handlers to something more obvious, but I can't locate any changed styles in the Elements panel. I also tried adding console.log statements to the handlers for debugging purposes, but nothing is logged to the console when I click the buttons (although I don't know whether extensions have access to console.log).
Microsoft Edge 42.17134.1.0 Microsoft EdgeHTML 17.17134
I did a little digging in DevTools, and found I had to change eg.
browser.tabs.insertCSS({code: ".c-uhfh .brand-neutral { background: red !important; }"});
to
browser.tabs.insertCSS({code: ".c-uhfh > div:first-child { background: red !important; }"});
You will also want to change the background for reset from #2f2f2f to #fff for the updated docs.microsoft.com design.