# Offical addons site cannot using insertCSS api of WebExtensions

**URL:** <https://discourse.mozilla.org/t/offical-addons-site-cannot-using-insertcss-api-of-webextensions/12957>\
**Category:** addons.mozilla.org\
**Created:** [January 12, 2017, 6:54am UTC](https://discourse.mozilla.org/t/offical-addons-site-cannot-using-insertcss-api-of-webextensions/12957 "2017-01-12T06:54:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hoffman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@Hoffman](https://discourse.mozilla.org/u/Hoffman)\
**Post date:** [January 12, 2017, 6:54am UTC](https://discourse.mozilla.org/t/offical-addons-site-cannot-using-insertcss-api-of-webextensions/12957/1 "2017-01-12T06:54:24Z")

</div>

When i try to use insertCSS api of WebExtensions  
i found that only offical addons site ([https://addons.mozilla.org](http://addons.mozilla.org)) cannot trigger the insertCSS api  
[https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/insertCSS](https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/insertCSS)  
here my example code:

> ```
> browser.runtime.onMessage.addListener((req, sender, res) => {
> if (req.message === 'active') {
> browser.tabs.insertCSS(tt, {file: './css/test.css?v='+id, runAt: 'document_start'}) 
> }
> })
> 
> ```

---

<div class="post-metadata">

**Author:** ![asamuzaK](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/asamuzak/32/18266_2.png) [@asamuzaK](https://discourse.mozilla.org/u/asamuzaK)\
**Post date:** [January 13, 2017, 11:38am UTC](https://discourse.mozilla.org/t/offical-addons-site-cannot-using-insertcss-api-of-webextensions/12957/2 "2017-01-13T11:38:38Z")

</div>

Content script is disabled in AMO

[WebExtensions content script won’t be attached to some CSP pages - Add-ons / Development - Mozilla Discourse](https://discourse.mozilla-community.org/t/webextensions-content-script-wont-be-attached-to-some-csp-pages/12188)

[1310082 – WebExtension content script not working on mozilla.org sites](https://bugzilla.mozilla.org/show_bug.cgi?id=1310082)

---

<div class="post-metadata">

**Author:** ![Hoffman](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@Hoffman](https://discourse.mozilla.org/u/Hoffman)\
**Post date:** [January 15, 2017, 11:12am UTC](https://discourse.mozilla.org/t/offical-addons-site-cannot-using-insertcss-api-of-webextensions/12957/3 "2017-01-15T11:12:02Z")

</div>

Got it, thank you asamuzaK
