{"action":"created","issue":{"url":"https://api.github.com/repos/duckduckgo/duckduckgo-privacy-extension/issues/281","repository_url":"https://api.github.com/repos/duckduckgo/duckduckgo-privacy-extension","labels_url":"https://api.github.com/repos/duckduckgo/duckduckgo-privacy-extension/issues/281/labels{/name}","comments_url":"https://api.github.com/repos/duckduckgo/duckduckgo-privacy-extension/issues/281/comments","events_url":"https://api.github.com/repos/duckduckgo/duckduckgo-privacy-extension/issues/281/events","html_url":"https://github.com/duckduckgo/duckduckgo-privacy-extension/pull/281","id":351052343,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4NzQzMjY4","number":281,"title":"Refactor element hiding to make it more dynamic and less cpu-intensive","user":{"login":"dharb","id":4481594,"node_id":"MDQ6VXNlcjQ0ODE1OTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/4481594?v=4","gravatar_id":"","url":"https://api.github.com/users/dharb","html_url":"https://github.com/dharb","followers_url":"https://api.github.com/users/dharb/followers","following_url":"https://api.github.com/users/dharb/following{/other_user}","gists_url":"https://api.github.com/users/dharb/gists{/gist_id}","starred_url":"https://api.github.com/users/dharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dharb/subscriptions","organizations_url":"https://api.github.com/users/dharb/orgs","repos_url":"https://api.github.com/users/dharb/repos","events_url":"https://api.github.com/users/dharb/events{/privacy}","received_events_url":"https://api.github.com/users/dharb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-16T04:35:26Z","updated_at":"2018-08-27T20:03:09Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/duckduckgo/duckduckgo-privacy-extension/pulls/281","html_url":"https://github.com/duckduckgo/duckduckgo-privacy-extension/pull/281","diff_url":"https://github.com/duckduckgo/duckduckgo-privacy-extension/pull/281.diff","patch_url":"https://github.com/duckduckgo/duckduckgo-privacy-extension/pull/281.patch"},"body":"<!-- Please add the WIP label if the PR isn't complete. -->\r\n\r\n**Reviewer:** @kdzwinel \r\n\r\n**CC:** @jdorweiler @russellholt \r\n\r\n## Description:\r\nThis updates the element hiding data flow so that blocked frames are now dealt with as requests are blocked. Previously a list of blocked requests was fetched once per frame at the time of load, however that encountered issues when trackers were written into iframes after page load via document.write calls. Additionally, this now properly handles iframes that don't have src attributes.\r\n\r\n## Steps to test this PR:\r\n1. Test on yahoo.com to ensure no regressions in functionality have occurred.\r\n2. Test on engadget.com to ensure that blocked ads are hidden properly (there's usually a blocked ad in the top right of the page that should be collapsed).\r\n3. Whitelist one of these domains, and reload page. Element hiding should be disabled.\r\n3. Test on non-oath domain to check that element hiding is disabled there.\r\n\r\n\r\n## Automated tests:\r\n- [ ] Unit tests\r\n- [ ] Integration tests\r\n\r\n###### Reviewer Checklist:\r\n- [ ] **Ensure the PR solves the problem**\r\n- [ ] **Review every line of code**\r\n- [ ] **Ensure the PR does no harm by testing the changes thoroughly**\r\n- [ ] **Get help if you're uncomfortable with any of the above!**\r\n- [ ] Determine if there are any quick wins that improve the implementation\r\n\r\n\r\n###### PR Author Checklist:\r\n- [ ] Get advice or leverage existing code\r\n- [ ] Agree on technical approach with reviewer (if the changes are nuanced)\r\n- [ ] Ensure that there is a testing strategy (and documented non-automated tests)\r\n- [ ] Ensure there is a documented monitoring strategy (if necessary)\r\n- [ ] Consider systems implications \r\n"},"comment":{"url":"https://api.github.com/repos/duckduckgo/duckduckgo-privacy-extension/issues/comments/416350300","html_url":"https://github.com/duckduckgo/duckduckgo-privacy-extension/pull/281#issuecomment-416350300","issue_url":"https://api.github.com/repos/duckduckgo/duckduckgo-privacy-extension/issues/281","id":416350300,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjM1MDMwMA==","user":{"login":"dharb","id":4481594,"node_id":"MDQ6VXNlcjQ0ODE1OTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/4481594?v=4","gravatar_id":"","url":"https://api.github.com/users/dharb","html_url":"https://github.com/dharb","followers_url":"https://api.github.com/users/dharb/followers","following_url":"https://api.github.com/users/dharb/following{/other_user}","gists_url":"https://api.github.com/users/dharb/gists{/gist_id}","starred_url":"https://api.github.com/users/dharb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dharb/subscriptions","organizations_url":"https://api.github.com/users/dharb/orgs","repos_url":"https://api.github.com/users/dharb/repos","events_url":"https://api.github.com/users/dharb/events{/privacy}","received_events_url":"https://api.github.com/users/dharb/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T20:03:09Z","updated_at":"2018-08-27T20:03:09Z","author_association":"CONTRIBUTOR","body":"Alright, I've asked the question in all three forums, now we wait. I'll update here again when I've heard a definitive answer.\r\n\r\nAs far as testing goes, it seems like we are moving in the direction of building more content script functionality into our extension (for instance, one-off site fixes and https asset rewrites), and setting up a testing harness for these injected scripts is going to be a significant undertaking. The more I think about it, the more it seems that it should probably be its own project that we scope outside of this PR. \r\n\r\nIn the process of building this element hiding content script, what really helped was setting up a test page (https://dave.duckduckgo.com/elemhide.html) to verify that the script worked properly. What would you think about creating a real public test page to run our tests on? I found that eff is doing exactly this in order to test their surrogate code implementation (https://www.eff.org/files/pbtest/ga_js_surrogate_test.html)."}}
{"actor":{"display_login":"dharb"}}