MicrosoftEdge-Extensions-Demos icon indicating copy to clipboard operation
MicrosoftEdge-Extensions-Demos copied to clipboard

Color-changer example does not change the color

Open Basa0 opened this issue 7 years ago • 2 comments

Everything works but the color change itself (inserting the css).

Microsoft Edge 42.17134.1.0 Microsoft EdgeHTML 17.17134

Basa0 avatar Jul 26 '18 17:07 Basa0

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

jimjam-slam avatar Aug 17 '18 07:08 jimjam-slam

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.

Sebbs128 avatar Oct 07 '18 06:10 Sebbs128