Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Color-changer example does not change the color #21

Open
Basa0 opened this issue Jul 26, 2018 · 2 comments
Open

Color-changer example does not change the color #21

Basa0 opened this issue Jul 26, 2018 · 2 comments

Comments

@Basa0
Copy link

Basa0 commented Jul 26, 2018

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

Microsoft Edge 42.17134.1.0
Microsoft EdgeHTML 17.17134

@jimjam-slam
Copy link

jimjam-slam commented Aug 17, 2018

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

@Sebbs128
Copy link

Sebbs128 commented Oct 7, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants