uBlock icon indicating copy to clipboard operation
uBlock copied to clipboard

[Firefox] No element hiding upon start

Open DotTheI opened this issue 11 years ago • 23 comments

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 avatar Mar 11 '15 17:03 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

DotTheI avatar Mar 11 '15 18:03 DotTheI

Selected filter lists please.

gorhill avatar Mar 11 '15 18:03 gorhill

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

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

gorhill avatar Mar 11 '15 18:03 gorhill

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

DotTheI avatar Mar 11 '15 18:03 DotTheI

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

DotTheI avatar Mar 11 '15 18:03 DotTheI

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 avatar Mar 11 '15 19:03 gorhill

Please advise, how does one injects the content scripts?

DotTheI avatar Mar 11 '15 19:03 DotTheI

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

gorhill avatar Mar 11 '15 19:03 gorhill

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!

DotTheI avatar Mar 11 '15 19:03 DotTheI

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.

gorhill avatar Mar 11 '15 19:03 gorhill

@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.

elyrly avatar Mar 11 '15 23:03 elyrly

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

gorhill avatar Mar 12 '15 14:03 gorhill

Yes, I guess.

Deathamns avatar Mar 12 '15 14:03 Deathamns

Fixed with 4ad98583579c8b187e7008e70d1ac30fd20404c8.

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

gorhill avatar Mar 12 '15 18:03 gorhill

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.

Deathamns avatar Mar 12 '15 18:03 Deathamns

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

gorhill avatar Mar 12 '15 18:03 gorhill

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.

Deathamns avatar Mar 12 '15 18:03 Deathamns

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 avatar Mar 13 '15 17:03 DotTheI

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

DotTheI avatar Mar 13 '15 18:03 DotTheI