Skip to content

Loading…

[Firefox] No element hiding upon start #991

Closed
DotTheI opened this Issue · 23 comments

4 participants

@DotTheI

I am using FF 36.0.1 for OS X 10.10 with uBlock 0.9. uBlock is not hiding selected elements when a page where the elements are found is loaded upon FF start. The uBlock icon is gray then. Once the page is refreshed, elements are hidden properly and the icon is red.

@DotTheI

I (re)start browser with http://rutracker.org/forum/index.php already opened. The filters I am using are:

! 11/03/2015 21:17:33 http://rutracker.org/forum/viewtopic.php?t=4610627
||195.82.146.52/logo/logo.gif

! 11/03/2015 21:17:46 http://rutracker.org/forum/viewtopic.php?t=4610627
rutracker.org###logo > .w100 > tbody > tr > .tCenter.w100

! 11/03/2015 21:17:55 http://rutracker.org/forum/viewtopic.php?t=4610627
rutracker.org###logo

! 11/03/2015 22:38:39 http://rutracker.org/forum/index.php
||ad.ddestiny.ru/bb/rutracker_left?rnd=370158360

! 11/03/2015 22:39:32 http://rutracker.org/forum/index.php
rutracker.org###ddest-bn-1

The top of the page should look like this:
2015-03-11 21 42 21
However, upon (re)start it looks like this:
2015-03-11 21 43 40

@gorhill

Selected filter lists please.

@gorhill

I could not reproduce with the information you gave me so far.

Of interest... What other extensions you have installed?

@DotTheI

Not sure what the selected filters list is. This?
2015-03-11 21 55 24

@DotTheI

The other add-on being used are:
2015-03-11 21 55 55

@gorhill

Ok, given the large amount of other add-ons, it's unlikely uBlock is guaranteed to be fully loaded before the web page loads.

The solution in such case is to implement for Firefox what is implemented in Chromium: to inject the content scripts on already opened web pages once uBlock finishes loading.

@gorhill gorhill changed the title from No element hiding upon start to [Firefox] No element hiding upon start
@DotTheI

Please advise, how does one injects the content scripts?

@gorhill

It's for the extension to do this, not you.

@DotTheI

I see. Does that mean there's nothing I can do to fix the issue? If so, thank you for your help! And thank you very much for development of uBlock!

@gorhill

Does that mean there's nothing I can do to fix the issue?

Not that I am aware. If there is a way to ensure uBlock is loaded before all other extensions that would probably fix your issue, but I have no idea whether this is possible.

@elyrly

@DotTheI
I tried reproducing the issue with the parameters you provided and was not able to show the logo and left-handed flash. Disable the other extensions and check again. Let us know the results.

@gorhill

@Deathamns Is it possible to inject content scripts on the active tab when vAPI.onLoadAllCompleted is called at launch time?

@Deathamns

Yes, I guess.

@gorhill

Fixed with 4ad9858.

I tested by enabling the extension after pages are loaded, and I confirm it worked.

@gorhill gorhill closed this
@Deathamns

However it doesn't (I didn't know a way) detect if the content scripts are already loaded, so it will load it again. Nor will it destroy them if the extension is disabled.

@gorhill

This code works on Chromium. Something like this would not work as well on Firefox?

@Deathamns

I create sandboxes in Firefox, which cannot be reached just like that. Chrome loads scripts into the same extension context. I'll try something else.

@DotTheI

I haven't tested yet, however, I just noticed that the rutracker.org logo 195.82.146.52/logo/logo.gif is blacklisted. Please do not blacklist it! It's not an ad, it's just my own preference not to have it shown.

PS I am having difficulties understanding how to tell uBlock not to block certain elements?

@DotTheI

Thank you gorhill! Have disabled the BitBlock list. I still would like to know how to disable certain filters. Is it possible?

@DotTheI

Please advise, how do I create an exception filter? Do I have to edit .txt files?

@ahmadassaf ahmadassaf pushed a commit to ahmadassaf/uBlock that referenced this issue
@gorhill gorhill this fixes #99, #991: ability to popunders 6418e6b
@ahmadassaf ahmadassaf pushed a commit to ahmadassaf/uBlock that referenced this issue
@gorhill gorhill this fixes #99, #991: ability to block popunders c39b892
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.