Changes between Version 10 and Version 11 of Ticket #5090


Ignore:
Timestamp:
04/21/2017 01:23:10 PM (2 years ago)
Author:
mjethani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5090 – Description

    v10 v11  
    44=== What to change === 
    55 
    6 When a content script sends a `get-selectors` message , try injecting the stylesheet from the backround page using `tabs.insertCSS({..., cssOrigin: "user})`. If it fails because `cssOrigin` isn't supported (i.e. on Firefox <53 and every other browser currently) remember that condition and don't try again. 
     6Check the platform and platform version via the `info` module to determine if user stylesheets are supported (i.e. if we are running on Firefox 53+ as of now). 
     7 
     8When a content script sends a `get-selectors` message, if user stylesheets are supported, try injecting the stylesheet from the backround page using `tabs.insertCSS({..., cssOrigin: "user})`. 
    79 
    810If the stylesheet was injected by `insertCSS()` and no devtools panel is active for the same tab, send following response: 
     
    2527}}} 
    2628 
    27 If `insertCSS()` doesn't support `cssOrigin`, set `inject` to `true` and always include the `selectors`, regardless whether the devtools panel is active: 
     29If user stylesheets are not supported, set `inject` to `true` and always include the `selectors`, regardless whether the devtools panel is active: 
    2830 
    2931{{{ 
     
    3638 
    3739Adapt the content script, so that it doesn't attempt to inject a stylesheet if `inject` is `false`. 
     40 
     41For CSS property filters, if `inject` is `false`, pass the selectors to the background page to inject the stylesheet using `insertCSS()`; otherwise inject the styles inline.