Changes between Version 1 and Version 5 of Ticket #3699


Ignore:
Timestamp:
03/17/2016 07:46:43 PM (4 years ago)
Author:
sebastian
Comment:

Replying to mapx:

I can see (at the top of the page, after the shadow section) using inspect:

style {                 user agent stylesheet

    display: none;
}

Does this mean can't be injected user css rules / stylesheets ?

No, that just means that <style> themselves are generally not visible.

Replying to mapx:

"the site is removing ABP's/AdBlock's injected CSS rules, and also disable their injected stylesheets though the StyleSheet.disabled property."

I can confirm that they disable it. It doesn't seem that they remove it.

Anyway, I think I found a reliable way to tackle that kind of circumvention, it's quite ugly though, see the updated issue description. But given that the practice of messing with our stylesheet becomes increasingly popular, I guess we have to do that.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3699

    • Property Summary changed from extremetech.com css rules / style disabled in chrome ? to Patch DOM API in order to prevent disabling the injected stylesheet
    • Property Priority changed from Unknown to P3
    • Property Owner set to sebastian
    • Property Ready set
    • Property Type changed from defect to change
  • Ticket #3699 – Description

    v1 v5  
    1 === Environment === 
    2 windows 7 
    3 chrome Version 49.0.2623.54 beta-m (64-bit) 
    4 ABP 1.10.2.1557, easylist 
     1=== Background === 
    52 
    6 === How to reproduce === 
    7 go to http://www.extremetech.com/ 
     3Some websites (e.g. extremetech.com) currently circumvent element hiding by messing (usually disabling) the style sheet we inject in order to hide ads. 
    84 
    9 the top banner can't be blocked / hidden 
     5We already detect when the <style> is removed from the DOM, in which case we reinject the rules in the last stylesheet by the page itself (#1677). However, `MutationObserver` or other DOM APIs don't allow for detecting  when the stylesheet gets disabled. 
    106 
    11 I can see (at the top of the page, after the shadow section) using inspect: 
    12 {{{ 
    13 style {                 user agent stylesheet 
     7But with some effort it's possible to monkey-patch the DOM API in order to intercept code messing with our style sheet. 
    148 
    15     display: none; 
    16 } 
    17 }}} 
     9=== What to change === 
    1810 
    19 Does this mean can't be injected user css rules / stylesheets ? 
    20  
    21 In firefox the banner is correctly hidden / blocked. 
     11Remove the measure implemented by #1677. And instead patch the DOM API, ignoring calls that would essentially disable or remove our stylesheets.