uBlock-LLC / uBlock

uBlock: a fast, lightweight, and lean blocker for Chrome, Firefox, and Safari.
https://ublock.org/
GNU General Public License v3.0
8.18k stars 435 forks source link

Element blocking fails on first page loaded when starting the browser #1319

Closed AlexVallat closed 2 years ago

AlexVallat commented 9 years ago

This was originally reported in a comment by @hotdogman here: https://github.com/chrisaljoudi/uBlock/issues/1315#issuecomment-96222188

Further investigation shows that it is not specific to that branch, or, I believe, even to Firefox.

To reproduce:

This fails, either by having a strange whole-page element selected effect, or by not starting the picker at all. Investigating this on Firefox suggests that it is because the element picker script is being injected twice, which in turn appears to be because contentObserver.observe is being called twice for the initial document, resulting in vapi-client.js being sub-script loaded twice and so on.

The code isn't common, but a cursory test on Chrome seems to indicate that something is going wrong there too.

ghost commented 9 years ago

Tested with Firefox 37.0.2, Pale Moon 25.3.1, SeaMonkey 2.33.1 and uBlock 0.9.3.5/ed6064/latest commit from AlexVallat/Legacy_Toolbar_Button. All browsers started with a clean profile, only difference is that uBlock was installed and browser.startup.homepage was set to http://www.seamonkey-project.org/start/.

Like I said, I was only able to reproduce this on SeaMonkey. Firefox and Pale Moon both worked fine. http://a.pomf.se/xtkpms.webm