Changes between Version 20 and Version 24 of Ticket #1727


Ignore:
Timestamp:
07/28/2016 10:59:25 AM (10 months ago)
Author:
kzar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1727 – Description

    v20 v24  
    3434 
    3535It's important to test as many websites that use WebSockets properly as possible, wrapping WebSocket like this could well cause problems. (For more examples see the discussions linked in the References section above.) 
     36 
     37Finally we refactored some of the code added with issue #1677 whilst making these changes. So it's also important to make sure that code to protect our ElemHide stylesheets still works. In case the US version of Yahoo no longer uses this circumvention technique here are the steps I took to test the feature. (All in the console for a webpage.) 
     38 
     391. Find our stylesheet: `var sheet = document.documentElement.shadowRoot.styleSheets[0];` (Note: On some browsers you will need to remove the ".shadowRoot", also note that 0 might be the wrong index. You'll have to experiment to figure out the correct number.) 
     402. Make sure you have the correct stylesheet by checking its first rule: `sheet.rules[0];` (It should have a whole bunch of selectors to hide advertisements.) 
     413. Once you have the correct stylesheet take note of the number of rules it contains: `sheet.rules.length;` (For me, with just EasyList enabled I saw 87 rules.) 
     424. Now try removing a rule: `sheet.removeRule(0); sheet.deleteRule(0);` 
     435. Now check no rules were removed, by checking the number of rules again: `sheet.rules.length;`