Skip to content

Loading…

Are you planning on releasing a Firefox port? #27

Closed
skudo12 opened this Issue · 234 comments
@skudo12

First of all, I saw that you have started another project (based on your first which is so awesome) and would like to congratulate you for yet another successful project. :D

Is there any plan on releasing a Firefox port for µblock? I tried it in Chromium and impressed in how light it is. It would be nice to see it running in Firefox. I have yet to find a blocker similar to µblock in Firefox.

@gorhill

Yes that would be nice, it seems people like it, more than I expected (given that it doesn't do all what ABP currently does -- like manually blocking elements, or entering URL to lists). I am currently quite loaded, and there are still important issues in need of fixing with HTTPSB.

Learning a whole new API is very time consuming. Even with the chrome API I can spend a while trying to figure why something unexpected is happening (as happened yesterday), so let alone a new one.

What would be nice is an angel developer doing some leg works to port to Firefox, and I could do my part in splitting more the platform specific stuff out of the core code as per feedback, etc. Eventually both projects could be merged.

@entepe85

I'd generally second this request, even though I can't be of great help for a port since I unfortunately know close to nothing about extension development. Would love to have this great extension in Firefox nevertheless.

@voltagex

I wonder if it'd be helpful to split out various "bite-size" chunks of work and add them as specially tagged issues in here.

@gorhill
  • Skeleton framework
    • Where to hook net request handling?
    • Where to hook initialisation?
    • Where to save/restore data?
    • Are core, content scripts, popup and dashboard page all in separate contexts? If yes:
      • What messaging infrastructure FF provides?
  • Initialization of the core
    • Reading user settings (which lists are selected etc.)
    • Loading, parsing the lists, storing the filters
  • Intercepting net request and potentially cancel them as per filters
  • Local mirroring
  • Pop-up blocking
  • Content-scripts
    • Element picker
    • Cosmetic filtering
  • Infrastructure to update updatable assets
  • Popup menu
  • Dashboard
@gorhill gorhill added the available label
@maikelswe

+1 for a FF version sorry I can´t help with it, i´m a Cisco guy not a programmer

@Ahriman

Please make a version for FF :D thanks!

@WyohKnott

This would be great indeed, I'm using Bluhell Firefox on Firefox currently but it has limited functions.

If anyone wants to start, here's the list of relevant hooks https://developer.mozilla.org/en/docs/Observer_Notifications#HTTP_requests
to use with https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/system_events

@ThePierrezou

Yes please do a firefox version there isn't one good adblocker on firefox Please :'(

@Deathamns

uBlock.xpi

Update:
Newer builds can be downloaded from the releases section.

@my-password-is-password

Cool. Testing it out.

When I restore from a file the options in the "Settings" and "Statistics" tabs doesn't restore. Same happens when you try resetting to default.

@gorhill

@Deathamns Wow, this is awesome.

@gorhill

Among first thing I tried, the VIM Color Scheme Test (which originally is why I decided to start uBlock):

From Mozilla dev re. VIM test vs. ABP:

According to about:memory, window-objects->layout->style-sets is the epicenter of the usage (jumping about 1 GB)

So I just looked:

  • uBlock + default filter lists [1]: window-objects->layout->style-sets = 49 MB.
  • ABP + filter lists in [1]: window-objects->layout->style-sets = 1,565 MB.
  • No blocker: window-objects->layout->style-sets = 49 MB.

  • [1] Default filter lists:
    • EasyList
    • Peter Lowe's Ad server list
    • EasyPrivacy
    • Fanboy's Social Blocking List
    • Malware domain lists
@alekksander

"Show the number of blocked requests on the icon" is not remembered upon restart.
0.8.2.0 is the version shown in add-ons manager, and 0.7.2.0 is shown in addon menu.
beside that, after several minutes of testing - brilliant! thank You again Deathamns!

@gorhill

Another thing to look into, is that blocking inline javascript specifically does not seem to work: Test page. Is it a limitation of Firefox re. Content Security Policy? Never mind, I see onHeaderReceived has not been implemented yet.

@Deathamns

This is just an early preview, still implementing the basics. I'm not even sure if reporting issues at this point is necessary. I just wanted to show what I was working on, and what can be expected for Firefox, but it's definitely not ready.

@my-password-is-password @alekksander You're probably talking about the same problem, which I was aware of.

@gorhill For me, ABP freezes the whole browser with 1GB+ RAM usage on the VIM page, I have to kill the process. However, there's no problem with µBlock, so my testing stopped here.
(By the way, your links to both the VIM Color Scheme Test (wrong link) and why (extra slash) are broken.)

As I said, some things are still missing, for example blocking inline scripts or pop-ups, experimental features, context menu, and there are bugs too, like the pop-up doesn't hide when a link is opened from it, or settings don't save in some cases (above mentioned)...

@gorhill gorhill removed the available label
@gorhill

@Deathamns

This is just an early preview, still implementing the basics.

Understood. Issues should be filed once you decide it's ready for this. It works pretty well overall already. One thing is for sure: this is a huge milestone. Such a nice thing to see first thing this morning. Thank you very much for your work on portability and now the Firefox port a whole lot of people are waiting for.

@Deathamns

I'm curious about one thing though. There is a constant crash in e10s enabled Nightly.
After the extension is installed, restart the browser and all tabs will crash because of the extension. However, if I disable the extension, and enable it (via the Add-ons Manger, without restarting the browser), then It will work normally. Can someone confirm this?

@harshanvn

Maybe file a bug at bugzilla?
e10s are not working for me with yesterday's build. Getting a black page. Will update tonight and see if I can test this in e10s.
Congratulations for huge milestone. Soon I will be start using Firefox again.:)

@Deathamns

A crash report about this issue was created earlier, and if anyone wants to confirm it, here is the thread.

@JBey4you

Thanks for this @Deathamns, really appreciate your effort!

I was wondering: is the difference between Adblock Plus - uBlock is as important on Firefox, compared to Chrome? (I know it's still an early version, so improvements can be made.)

@gorhill

@JBey4you never mind my previous post, actually I am not sure what you are asking.

@JBey4you

@gorhill Your previous post was actually what I was looking for. ;-) I'm just wondering if the difference between Adblock Plus and uBlock is as good as the one on Chrome. Something like this (found on your wiki)

gorhill edit: replaced pic with link to wiki

@gorhill

Your previous post was actually what I was looking for

Oh ok, so I will post something concrete soon. All done manually (though very carefully), as I don't have my benchmark tool on Firefox.

@JBey4you

So it's positive, great! Firefox seems "heavy" sometimes, I'm sure uBlock will be helpful now.

@HubJ

On Firefox 24-8-1 ESR, the attempt to install uBlock.xpi from the link above fails with the message: "The add-on downloaded from GitHub.com could not be installed because it is not compatible with Firefox 24.8.1."

@CrisBRM

How about using this as well? https://addons.mozilla.org/en-us/firefox/addon/about-addons-memory/ It'd make it easier to measure the performance of one extension compared to the other, statistically.

@gorhill

@CrisBRM One of the thing that I had a harder time to show with Chromium, and which I believe is the more important figure, is the extension's own memory footprint PLUS contributed memory footprint to web pages, because with Chromium everything is in its own process, I would have had to manually collate and sum the figures (meh). With Firefox however, being single-tasked, I can do it easily above without requiring any special tool.

I do not doubt that uBlock itself is leaner than ABP, including in the long run, I've seen enough of ABP's code to know that unless they refactor, it just can't match uBlock for own memory footprint.

However the biggest improvement uBlock's brings relative to ABP is the significantly smaller contributed memory footprint to web pages (see results above): would about-addon-memory help to report this contributed memory footprint to web pages as well?

@CrisBRM

It would not (because as the name implies it reports the memory used by the addons only) and you're right about that, but relative performance of each extension is a better measurement of how well optimised it is, especially due to how terrible ABP's cache implementation is.

On a side note, regarding your comment on Chrom* based browsers, you don't have to sum the figures of each individual process, just go to chrome://memory.

@CrisBRM

Installed firefox and tried to do the same and got similar results, probably because the extensions gets the numbers from firefox's about:memory page, under "extensions", using the extension's ID. I confirmed this and it's the same number as the one being reported by the extension.

@gorhill

under "extensions", using the extension's ID

Actually, using about:memory, I get:

ABP: 36.3 MB
uBlock: 7.09 MB

│   ├──36.30 MB (17.41%) ++ {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/js-non-window/zones/zone(0x7fab8615d000)/compartment([System Principal], jar:file:///home/rhill/.mozilla/firefox/mwad0hks.default/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource://gre/modules/addons/XPIProvider.jsm:4176))
│   ├───7.09 MB (03.40%) ++ {2b10c1c8-a11f-4bad-fe9c-1c11e82cac42}
│   └───0.24 MB (00.12%) ++ about-addons-memory@tn123.org/js-non-window/zones/zone(0x7fab8615d000)

I suspect about:addons-memory is not fetching the proper entry for uBlock because it was not installed from the store. Still, 7 MB vs. 36 MB is an even better ratio than what's I've seen on Chromium (roughly it uBlock has been 50% of ABP for Chromium).

@CrisBRM

It's worth noting that I only tried that with ABP and gave up before installing uBlock, but yes, that's even greater. This has just been featured on ghacks.

@greduan

Is the source for the port available outside of the .xpi? I.e. in GitHub or something similar?

@Deathamns

@HubJ It's compatible from Firefox 29. Developing Firefox extensions in not a pleasant experience (in my opinion), especially supporting older versions, so I decided not to make any effort to support them. Someone else has to do it (if it's needed).

@CrisBRM @gorhill about:addons-memory is not helpful in case of µBlock.
Those numbers only show how much the content scripts use (not sure if the stylesheets are included).

@Greduan Here.

@JBey4you

@Deathamns : I do not want to rush you at all, but I'm wondering if you have an idea for a potential date for the final version?

I'm testing the .xpi found here right, and it seems pretty stable to be honest.

@Deathamns

2015.

@Dimas-sc

Is it normal to view the interface in ... oriental language? http://i.imgur.com/QTWBWTe.png + http://i.imgur.com/HijXCdr.png

@logos88

Great work! Just the only extension that Firefox was lacking!! :)

It would be interesting not only a MB comparison, but a CPU consumption too.

@CrisBRM

@logos88 oh, I'm sure Raymond won't miss out on an opportunity to publically humiliate Palant again, so don't you worry about that.

@Deathamns

@Dimas-sc Open the Web Console (Menu/Tools/Web Developer/Web Console or Ctrl+Shift+I or F12) on the Options page, and in the Console tab, type and run this: console.log(navigator.language)
Copy-paste the result here.

@gorhill

@CrisBRM Benchmarking is never about humiliating -- that is not my state of mind, it's about having hard data from which to work on for the project's own benefits -- as stated on the first page, "development through benchmarking". Of course using benchmark results to also compare to existing solutions out there is expected in software development. Benchmarks/becnhmark results can be disputed, but this better be done in an intellectually honest manner, or else risk look foolish.

@Dimas-sc

12:57:31.943 console.log(navigator.language);
12:57:31.947 undefined

But the locale of my browser is the catalan (ca)

@Deathamns

I should have said to write only navigator.language, because console.log gives an extra undefined line before the result. So, you should see a "ca" too under the undefined line.

I thought that your problem is that the language you see is not right-to-left oriented, but now I see that the problem simply that English is not used as default language. OK, will be fixed.

@gorhill

I have added Chromium results in the benchmark results above. Interesting to compare both browsers.

@ThePurpleCrayon

I installed uBlock, disabled AdBlock Plus, disabled Ghostery & disabled my hosts file.
Within uBlock, I disabled & purged all filters and copied my hosts file contents within uBlock
-all 949,973 entries...
I am running Waterfox 33.0.2 with 7 extensions and 6 user scripts enabled.....Holy Shit!
Can I say Holy Shit!? The browser is running like a first install, with uBlock blocking everything that all the other elements combined were blocking previously.

What do you want for Christmas? This is the .xpi of the century!

@gorhill

copied my hosts file contents within uBlock all 949,973 entries...

Ah yes, uBlock is specially optimized for hostname-only based filters, because that part of the code came from HTTP Switchboard, and it had to be highly optimized as the evaluation of a net request against a dictionary of 70,000 hostnames (the sum of entries in most common hosts files) had to be lightning fast. Happy to hear it still work fine with 950K entries.

The launch speed should be even better once uBlock makes a selfie of itself (occurs automatically after a while when no change to filter lists), this will allow skipping the parsing of the raw filters next time uBlock launches.

@fhoshino

The nightly release of ublock is blazing fast compared w/ abp.
Thank you for just porting this extension I'm long waiting while I'm using chrome.

Though I've a problem of memory leak with windows x64 nightly firefox.
I have a few javascript heavy tabs (facebook, twitter, plurk, google+, gmail)
The memory usage surge up to 2.3gb on my config.
I'm capped on 1.5gb with the same config w/ abp.

@gorhill

I have a few javascript heavy tabs (facebook, twitter, plurk, google+, gmail)
The memory usage surge up to 2.3gb on my config.
I'm capped on 1.5gb with the same config w/ abp.

I tested your scenario, using Firefox 34 64-bit + uBlock + default filter lists.

I opened the pages you list (on top of the ones I had already opened), and played with the contents to force the pages to do some work (scrolling down to force new content to be loaded, changing DOM tabs, etc.). Eventually I opened about:memory, GC'd/CC'd/Minimized[1] and "Explicit allocations" was at 695 MB. Then I closed all the above web pages, forced a GC/CC/Minimize, and memory went down to 291 MB (w/ uBlock at 8 MB).

So, could this be specific to Firefox Nightly? (Though I suppose it is possible an early preview version could have memory leaks).

[1] does FF do this automatically at some point during idle time? (I am assuming yes)

@DomT4

uBlock.xpi

@Deathamns I can't seem to get the link to open for me. Just keep bumping into an interrupted connection. Is the .xpi anywhere else?

@fhoshino

@gorhill Firefox would have auto GC I guess, but I'm a heavy user and I don't have much idle time for it, and I don't open about:memory to do a manual GC while I'm working with it.
I'll try to get you some stats with my config.

@DomT4

I can't seem to get @Deathamns's fork to build using the scripts provided. I'm probably just being a moron though. Here's the bug if its useful:

*** uBlock_xpi: Copying files
rm: dist/build/uBlock_xpi: No such file or directory
*** uBlock_xpi: Generating meta...
Traceback (most recent call last):
  File "tools/make-firefox-meta.py", line 29, in <module>
    with open(locale_path, encoding='utf-8') as f:
TypeError: 'encoding' is an invalid keyword argument for this function

I'm not doing anything particularly whack with my locale setting:

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
@Deathamns

@DomT4 I don't see any problem with the link. Try downloading it through a proxy.
Also, you need Python 3 to build for Firefox.

@fhoshino

Here are some stats from a half hour heavy browsing session.
http://pastebin.com/9frb0YZz

This is my config
http://pastebin.com/PYbMa8jk

@DomT4

@Deathamns Turns out I'm an idiot and googledrive.com somehow ended up on my hosts list. Oops.

Also, you need Python 3 to build for Firefox.

I have both Python3 and Python on the system, both updated to the latest versions.

@Deathamns

Then probably it tries to run it through Python 2, maybe that is your default.

@DomT4

Hit the same error if I do python3 make-firefox-meta.py. Hit the same error with the Safari script FWIW.

@Deathamns

Try adding the following line to the beginning of the .py files: from io import open

@gorhill

@fhoshino I ran a session for just https://plus.google.com (which was a top mem consumer in your log), first with ABP, then with uBlock. Loaded https://plus.google.com in one tab, slowly hit Page Down 50 times, hit Home. Then I opened about:memory, GC/CC/Minimized, then save measurements to a file. Then I loaded the diff of the two result sets (see below).

Negative figures is the extra amount ABP used over uBlock. Positive is the extra amount of memory uBlock used over ABP.

What this shows is that with the page at https://plus.google.com the browser does uses 83 MB less memory with uBlock than with ABP (for just that one page, after having interacted with as per above steps). In what you posted on pastebin, I can see an orphaned branch (464.93 MB ... top(none)), which I believe is memory which would be reclaimed at some point. Your mem footprint for https://plus.google.com was double that on mine.

Now I don't have Nightly, but so far since I can't reproduce the hight memory footprint with FF34, it points to the possibility that the problem is specific to Nightly?

-83.76 MB (100.0%) -- explicit
├──-27.99 MB (33.42%) -- add-ons
│  ├──-37.12 MB (44.32%) ++ {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/js-non-window/zones/zone(0xNNN)/compartment([System Principal], jar:file:///home/rhill/.mozilla/firefox/mwad0hks.default/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource://gre/modules/addons/XPIProvider.jsm:4176))
│  └────9.13 MB (-10.91%) ++ {2b10c1c8-a11f-4bad-fe9c-1c11e82cac42}
├──-26.82 MB (32.02%) ++ js-non-window
├───-4.15 MB (04.96%) ++ images
├──-15.54 MB (18.56%) ── layout/style-sheet-service
├────1.49 MB (-1.78%) -- window-objects
│    ├──13.06 MB (-15.59%) ++ top(resource://gre-resources/hiddenWindow.html, id=1)
│    ├──-12.13 MB (14.49%) ++ top(https://plus.google.com/, id=8)
│    ├──-1.16 MB (01.39%) ++ top(about:newtab, id=73)
│    ├──1.16 MB (-1.39%) ++ top(about:newtab, id=77)
│    ├──0.87 MB (-1.03%) ++ top(about:memory, id=23)
│    ├──-0.84 MB (01.01%) ++ top(about:memory, id=19)
│    └──0.54 MB (-0.65%) ++ (4 tiny)
├───-6.41 MB (07.66%) ── heap-unclassified
├───-2.41 MB (02.88%) ── atom-tables/main
├───-0.67 MB (00.79%) -- heap-overhead
│   ├───1.01 MB (-1.21%) ── page-cache
│   ├──-0.92 MB (01.10%) ── bin-unused
│   └──-0.75 MB (00.90%) ++ (2 tiny)
├───-0.89 MB (01.06%) ++ network
└───-0.36 MB (00.43%) ++ (11 tiny)
@DomT4

Try adding the following line to the beginning of the .py files: from io import open

That replaces the old error with a new one:

*** uBlock_xpi: Generating meta...
Traceback (most recent call last):
  File "tools/make-firefox-meta.py", line 46, in <module>
    f.write('=')
TypeError: must be unicode, not str
@ghost

I just discovered the uBlock project via gHacks. Seems very promising. I'm committed to Firefox and AdBlock Plus/Edge together with Policeman. Having with uBlock the advantages of Adblock without its disadvantages is exciting to put it mildly. And I'm not the only one to believe so : Adblock users are, need to say, numerous. uBlock is on a highway.

@Deathamns

@DomT4 I just tried with Python 2, and got the same error, so you're clearly running it through Python 2, since it works works fine with 3.
But, you can make it work. Add a letter u before every string that is passed to f.write() (lines: 46, 48, 54, 58)
For example: f.write('=') to f.write(u'=')

@fhoshino

I still can produce the memleak in 34.0.5 x64
http://pastebin.com/114CVXCk

@sxe

I built a PKGBUILD for archlinux, which checks out the latest git version and installs it globally for all firefox profiles: https://aur.archlinux.org/packages/firefox-extension-ublock-git/

@gorhill

@fhoshino Quick analysis:

There is 578 MB waiting to be GC'd, so real memory footprint is 1,260 MB.

You have 19 tabs opened, using 446 MB. This leaves 814 MB which need to be identified.

The next largest contributors are: something called js-non-window (370 MB), heap-unclassified (126 MB), heap-overhead (108 MB), images (83 MB), etc.

I see uBlock is reported with a mem footprint of 40 MB, which does seem reasonable given you have 19 tabs opened. The thing to see really is if that 40 MB goes back to ~10 MB if you close the tabs.

I am not familiar yet with all things memory re. Firefox, but so far I don't see anything that catch my attention as being very wrong in there. This time the mem footprint for your plus.google.com page is more in line with what I've reported above.

In short, I don't really see what you call a "memleak" with your log. A mem leak is when the memory doesn't snap back to baseline after you close all but one empty web page (you have 19 of them opened as per log.) It has also to be shown that whatever the result is, it is different from when using whatever other alternative extension with rigorously the same steps.

The only way to support the case of a memory leak is to have at least two scenarios for one rigorous benchmark, one of which is the control scenario. The benchmark must have exact and detailed steps. I can't emphasize exact enough. Just opening a popup UI for an extension will increase memory footprint. Then once scenarios are complete, gather results. A third scenario can be added to also compare against an alternative (say ABP).

@gorhill

@sxe maybe it should be noted it's not a final version, only an early preview, so as to not create false expectations.

@sxe

@gorhill I added TESTVERSION to the package description. Even that is against the guidelines, so i guess that's all i can do. Besides that, it is a git package so users should be aware that it is a development version. If you prefer to not have the package online i will remove it of course.

@gorhill

@sxe I don't mind at all, the opposite actually, the early preview works well enough already. It's more for @Deathamns, I wouldn't want him to be swamped with lots of issues being opened while he is well aware of all that is left to add/fix.

@sxe

@gorhill i agree. So i will keep it up. I can remove if necessary.

@fhoshino

@gorhill is there a memory usage heavy benchmark I can use for?
I'd like to test it out.

@gorhill

@fhoshino I have my benchmark tool I wrote for Chromium, but since I'm a newbie to Firefox addon framework, I don't know what's out there for FF.

@DomT4

@Deathamns Your commit here seems to have fixed it for me, but I was definitely using Python3 previously:

screen shot 2014-12-20 at 17 59 21

/usr/bin/env Python3 -V
Python 3.4.2

Edit - Just for fun though, that commit also broke things for me until I changed /usr/bin/python3 back to /usr/bin/env python3 due to my python3 not living in /usr :wink:

@gorhill

I re-did the test for Chromium with click-to-play, as the Flash video which were playing during the test ended up creating a lot drowning memory usage noise. If somebody can tell me how to have click-to-play on Firefox, that would be nice, I just can't find it.

@r-a-y

If somebody can tell me how to have click-to-play on Firefox, that would be nice, I just can't find it.

Go to about:addons, click on the "Plugins" tab, go to "Shockwave Flash" and select "Ask to Activate".

@gorhill

I did that, it did not work, the video on Yahoo news kept playing every time. Now I just found out it seems to work... Whatever, now I can redo the tests.

All rights all test redone. Will move this to a wiki page eventually.

@stevenwu

Mac Firefox 34.0.5. I'm also getting these memory leaks / ghost windows. Freeing memory manually in about:memory does not clean up these windows. Issue is not present with ABP.

├──21.55 MB (07.08%) -- top(none)/ghost/window(https://twitter.com/)
│   │  ├──12.61 MB (04.14%) -- js-compartment(https://twitter.com/)
│   │  │  ├──11.78 MB (03.87%) -- classes
│   │  │  │  ├───6.03 MB (01.98%) -- class(Object)
│   │  │  │  │   ├──3.28 MB (01.08%) ++ objects
│   │  │  │  │   └──2.74 MB (00.90%) ++ shapes
│   │  │  │  └───5.76 MB (01.89%) ++ (7 tiny)
│   │  │  └───0.83 MB (00.27%) ++ (4 tiny)
│   │  ├───4.56 MB (01.50%) ++ dom
│   │  ├───4.29 MB (01.41%) ── style-sheets
│   │  └───0.10 MB (00.03%) ── property-tables
@gorhill

Issue is not present with ABP

Yes it is. It appears to be normal functioning of the browser. Ok what I see with ABP is rather top(none)/detached.

@Betsy25

@Everyone Where can I get uBlock for Firefox ?
I hear people talk about it but cannot find it ? :§(

@stevenwu

It's not normal functioning. There are many extensions that will cause this though. I don't know if it's a Mac issue, but here's a test with all addons disabled. I visit twitter.com then close the tab.

├───32.81 MB (14.79%) -- window-objects
│   ├──19.68 MB (08.87%) -- top(none)/detached
│   │  ├──19.23 MB (08.67%) -- window(https://twitter.com/)
│   │  │  ├──12.30 MB (05.54%) -- js-compartment(https://twitter.com/)
│   │  │  │  ├──11.37 MB (05.12%) -- classes
│   │  │  │  │  ├───5.32 MB (02.40%) -- class(Object)
│   │  │  │  │  │   ├──3.35 MB (01.51%) -- objects
│   │  │  │  │  │   │  ├──2.33 MB (01.05%) ── gc-heap
│   │  │  │  │  │   │  └──1.03 MB (00.46%) ++ malloc-heap
│   │  │  │  │  │   └──1.96 MB (00.89%) ++ shapes
│   │  │  │  │  ├───3.21 MB (01.45%) ++ (8 tiny)
│   │  │  │  │  └───2.84 MB (01.28%) ++ class(Function)
│   │  │  │  └───0.93 MB (00.42%) ++ (5 tiny)
│   │  │  ├───4.28 MB (01.93%) ── style-sheets
│   │  │  ├───2.60 MB (01.17%) ++ dom
│   │  │  └───0.05 MB (00.02%) ── property-tables
│   │  └───0.46 MB (00.21%) ++ window(about:blank)
│   ├───7.10 MB (03.20%) -- top(chrome://browser/content/browser.xul, id=5)
│   │   ├──6.17 MB (02.78%) -- active
│   │   │  ├──6.05 MB (02.73%) -- window(chrome://browser/content/browser.xul)
│   │   │  │  ├──3.63 MB (01.64%) ++ (4 tiny)
│   │   │  │  └──2.42 MB (01.09%) ++ js-compartment([System Principal], about:blank)
│   │   │  └──0.12 MB (00.05%) ++ window(about:blank)
│   │   └──0.92 MB (00.42%) ++ js-zone(0x1184ca000)
│   ├───3.18 MB (01.44%) ++ (4 tiny)
│   └───2.84 MB (01.28%) -- top(chrome://browser/content/hiddenWindow.xul, id=1)
│       ├──2.54 MB (01.14%) ++ active
│       └──0.31 MB (00.14%) ++ js-zone(0x10e563000)

Perform 'minimize memory usage' in about:memory.

206.69 MB (100.0%) -- explicit
├───76.83 MB (37.17%) ── heap-unclassified
├───55.64 MB (26.92%) -- js-non-window
│   ├──31.93 MB (15.45%) -- zones
│   │  ├──29.78 MB (14.41%) -- zone(0x107aad800)
│   │  │  ├──22.22 MB (10.75%) ++ (207 tiny)
│   │  │  ├───4.98 MB (02.41%) -- compartment([System Principal], resource://gre/modules/TelemetryFile.jsm)
│   │  │  │   ├──4.87 MB (02.35%) -- classes
│   │  │  │   │  ├──4.62 MB (02.23%) -- class(Object)
│   │  │  │   │  │  ├──4.37 MB (02.11%) -- objects
│   │  │  │   │  │  │  ├──3.82 MB (01.85%) -- malloc-heap
│   │  │  │   │  │  │  │  ├──3.78 MB (01.83%) ── elements/non-asm.js
│   │  │  │   │  │  │  │  └──0.04 MB (00.02%) ── slots
│   │  │  │   │  │  │  └──0.55 MB (00.26%) ── gc-heap
│   │  │  │   │  │  └──0.25 MB (00.12%) ++ shapes
│   │  │  │   │  └──0.25 MB (00.12%) ++ (3 tiny)
│   │  │  │   └──0.11 MB (00.05%) ++ (3 tiny)
│   │  │  └───2.57 MB (01.25%) ── unused-gc-things
│   │  └───2.16 MB (01.04%) ++ (2 tiny)
│   ├──22.10 MB (10.69%) -- runtime
│   │  ├──14.47 MB (07.00%) -- gc
│   │  │  ├──14.00 MB (06.77%) ── nursery-committed
│   │  │  └───0.47 MB (00.23%) ++ (3 tiny)
│   │  ├───4.53 MB (02.19%) ── script-data
│   │  ├───2.10 MB (01.02%) ── atoms-table
│   │  └───1.00 MB (00.48%) ++ (10 tiny)
│   └───1.61 MB (00.78%) ++ gc-heap
├───33.49 MB (16.20%) -- window-objects
│   ├──22.16 MB (10.72%) -- top(about:memory, id=34)
│   │  ├──21.90 MB (10.59%) -- active/window(about:memory)
│   │  │  ├──20.24 MB (09.79%) -- dom
│   │  │  │  ├──19.78 MB (09.57%) ── orphan-nodes
│   │  │  │  └───0.47 MB (00.23%) ++ (5 tiny)
│   │  │  └───1.65 MB (00.80%) ++ (4 tiny)
│   │  └───0.26 MB (00.13%) ++ js-zone(0x11eec6800)
│   ├───6.98 MB (03.38%) -- top(chrome://browser/content/browser.xul, id=5)
│   │   ├──5.97 MB (02.89%) -- active
│   │   │  ├──5.85 MB (02.83%) -- window(chrome://browser/content/browser.xul)
│   │   │  │  ├──3.60 MB (01.74%) ++ (4 tiny)
│   │   │  │  └──2.25 MB (01.09%) ++ js-compartment([System Principal], about:blank)
│   │   │  └──0.12 MB (00.06%) ++ window(about:blank)
│   │   └──1.01 MB (00.49%) ++ js-zone(0x1184ca000)
│   ├───2.84 MB (01.37%) -- top(chrome://browser/content/hiddenWindow.xul, id=1)
│   │   ├──2.53 MB (01.23%) ++ active
│   │   └──0.31 MB (00.15%) ++ js-zone(0x10e563000)
│   └───1.51 MB (00.73%) ++ (3 tiny)
├───19.22 MB (09.30%) -- heap-overhead
│   ├──13.28 MB (06.43%) ── bin-unused
│   ├───3.89 MB (01.88%) ── page-cache
│   └───2.04 MB (00.99%) ++ (2 tiny)
├────7.50 MB (03.63%) ++ (17 tiny)
├────4.94 MB (02.39%) -- workers/workers(chrome)
│    ├──2.91 MB (01.41%) ++ worker(resource:///modules/sessionstore/SessionWorker.js, 0x116d96c00)
│    └──2.03 MB (00.98%) ++ worker(resource://gre/modules/osfile/osfile_async_worker.js, 0x10de53800)
├────4.37 MB (02.11%) -- storage
│    ├──2.48 MB (01.20%) ++ prefix-set
│    └──1.89 MB (00.91%) ++ sqlite
├────2.39 MB (01.16%) -- atom-tables
│    ├──2.33 MB (01.13%) ── main
│    └──0.06 MB (00.03%) ── static
└────2.31 MB (01.12%) ++ images

There's no trace of twitter.

@gorhill

@stevenwu Do you reproduce consistently by

  1. opening twitter.com
  2. closing twitter.com
  3. Measuring memory?
@Betsy25

I get a message "The add-on could not be downloaded because of a connection failure on github.com" when trying to download it :unamused:
EDIT : Saving to disk and File/Open file... seems to works.
Thanks a lot !

@stevenwu

@gorhill It doesn't happen with all sites, but it happens on twitter. With only uBlock enabled, I visit twitter and close the tab.

│   ├──21.49 MB (10.75%) -- top(none)/detached
│   │  ├──20.37 MB (10.19%) -- window(https://twitter.com/)
│   │  │  ├──12.83 MB (06.42%) -- js-compartment(https://twitter.com/)
│   │  │  │  ├──11.73 MB (05.87%) -- classes
│   │  │  │  │  ├───6.00 MB (03.00%) -- class(Object)
│   │  │  │  │  │   ├──3.27 MB (01.64%) -- objects
│   │  │  │  │  │   │  ├──2.39 MB (01.19%) ── gc-heap
│   │  │  │  │  │   │  └──0.88 MB (00.44%) ++ malloc-heap
│   │  │  │  │  │   └──2.72 MB (01.36%) ++ shapes
│   │  │  │  │  ├───2.81 MB (01.41%) -- class(Function)
│   │  │  │  │  │   ├──2.11 MB (01.06%) ++ objects
│   │  │  │  │  │   └──0.70 MB (00.35%) ++ shapes
│   │  │  │  │  ├───2.10 MB (01.05%) -- class(Array)
│   │  │  │  │  │   ├──2.09 MB (01.05%) ++ objects
│   │  │  │  │  │   └──0.01 MB (00.00%) ++ shapes
│   │  │  │  │  └───0.82 MB (00.41%) ++ (5 tiny)
│   │  │  │  └───1.10 MB (00.55%) ++ (4 tiny)
│   │  │  ├───4.28 MB (02.14%) ── style-sheets
│   │  │  ├───3.20 MB (01.60%) ++ dom
│   │  │  └───0.05 MB (00.03%) ── property-tables
│   │  └───1.12 MB (00.56%) ++ window([system])

After 'Minimize memory usage',

│   ├──20.27 MB (10.69%) -- top(none)/ghost/window(https://twitter.com/)
│   │  ├──12.74 MB (06.72%) -- js-compartment(https://twitter.com/)
│   │  │  ├──11.73 MB (06.18%) -- classes
│   │  │  │  ├───5.99 MB (03.16%) -- class(Object)
│   │  │  │  │   ├──3.27 MB (01.72%) -- objects
│   │  │  │  │   │  ├──2.38 MB (01.26%) ── gc-heap
│   │  │  │  │   │  └──0.88 MB (00.47%) ++ malloc-heap
│   │  │  │  │   └──2.72 MB (01.44%) ++ shapes
│   │  │  │  ├───2.81 MB (01.48%) -- class(Function)
│   │  │  │  │   ├──2.11 MB (01.11%) ++ objects
│   │  │  │  │   └──0.70 MB (00.37%) ++ shapes
│   │  │  │  ├───2.10 MB (01.11%) -- class(Array)
│   │  │  │  │   ├──2.09 MB (01.10%) ++ objects
│   │  │  │  │   └──0.01 MB (00.00%) ++ shapes
│   │  │  │  └───0.82 MB (00.43%) ++ (5 tiny)
│   │  │  └───1.01 MB (00.53%) ++ (4 tiny)
│   │  ├───4.28 MB (02.26%) ── style-sheets
│   │  ├───3.20 MB (01.69%) -- dom
│   │  │   ├──1.95 MB (01.03%) ── element-nodes
│   │  │   └──1.25 MB (00.66%) ++ (5 tiny)
│   │  └───0.05 MB (00.03%) ── property-tables

Restart browser with only ABP on, visit twitter

─22.28 MB (08.28%) -- top(none)/detached
│   │  ├──20.32 MB (07.55%) -- window(https://twitter.com/)
│   │  │  ├──13.29 MB (04.94%) -- js-compartment(https://twitter.com/)
│   │  │  │  ├──11.88 MB (04.42%) -- classes
│   │  │  │  │  ├───6.11 MB (02.27%) -- class(Object)
│   │  │  │  │  │   ├──3.31 MB (01.23%) ++ objects
│   │  │  │  │  │   └──2.79 MB (01.04%) ++ shapes
│   │  │  │  │  ├───2.97 MB (01.10%) ++ (7 tiny)
│   │  │  │  │  └───2.80 MB (01.04%) ++ class(Function)
│   │  │  │  └───1.41 MB (00.52%) ++ (4 tiny)
│   │  │  ├───4.28 MB (01.59%) ── style-sheets
│   │  │  ├───2.70 MB (01.01%) ++ dom
│   │  │  └───0.05 MB (00.02%) ── property-tables
│   │  └───1.96 MB (00.73%) ++ (2 tiny)

Minimize memory usage.

211.17 MB (100.0%) -- explicit
├───71.31 MB (33.77%) -- js-non-window
│   ├──47.81 MB (22.64%) -- zones
│   │  ├──40.66 MB (19.25%) -- zone(0x10038e800)
│   │  │  ├──24.15 MB (11.44%) ++ (213 tiny)
│   │  │  ├──10.39 MB (04.92%) ── unused-gc-things
│   │  │  └───6.12 MB (02.90%) -- strings
│   │  │      ├──6.07 MB (02.88%) -- string(<non-notable strings>)
│   │  │      │  ├──4.69 MB (02.22%) -- gc-heap
│   │  │      │  │  ├──4.55 MB (02.16%) ── two-byte
│   │  │      │  │  └──0.13 MB (00.06%) ── latin1
│   │  │      │  └──1.39 MB (00.66%) ++ malloc-heap
│   │  │      └──0.05 MB (00.02%) ++ (3 tiny)
│   │  ├───6.87 MB (03.25%) -- zone(0x100389000)
│   │  │   ├──6.54 MB (03.10%) -- strings/string(<non-notable strings>)
│   │  │   │  ├──4.21 MB (01.99%) -- gc-heap
│   │  │   │  │  ├──4.21 MB (01.99%) ── latin1
│   │  │   │  │  └──0.00 MB (00.00%) ── two-byte
│   │  │   │  └──2.33 MB (01.10%) -- malloc-heap
│   │  │   │     ├──2.33 MB (01.10%) ── latin1
│   │  │   │     └──0.00 MB (00.00%) ── two-byte
│   │  │   └──0.33 MB (00.16%) ++ (5 tiny)
│   │  └───0.29 MB (00.14%) ++ zone(0x10038c800)
│   ├──21.03 MB (09.96%) -- runtime
│   │  ├──10.95 MB (05.19%) -- gc
│   │  │  ├───6.00 MB (02.84%) ── nursery-committed
│   │  │  ├───4.48 MB (02.12%) ── nursery-huge-slots
│   │  │  └───0.47 MB (00.22%) ++ (2 tiny)
│   │  ├───4.75 MB (02.25%) ── script-data
│   │  ├───4.10 MB (01.94%) ── atoms-table
│   │  └───1.23 MB (00.58%) ++ (10 tiny)
│   └───2.47 MB (01.17%) ++ gc-heap
├───34.55 MB (16.36%) ── heap-unclassified
├───34.08 MB (16.14%) -- window-objects
│   ├──23.02 MB (10.90%) -- top(about:memory, id=24)
│   │  ├──22.54 MB (10.67%) -- active/window(about:memory)
│   │  │  ├──20.87 MB (09.88%) -- dom
│   │  │  │  ├──20.40 MB (09.66%) ── orphan-nodes
│   │  │  │  └───0.47 MB (00.22%) ++ (5 tiny)
│   │  │  └───1.67 MB (00.79%) ++ (4 tiny)
│   │  └───0.47 MB (00.22%) ++ js-zone(0x1294ba800)
│   ├───6.69 MB (03.17%) -- top(chrome://browser/content/browser.xul, id=3)
│   │   ├──5.86 MB (02.77%) -- active
│   │   │  ├──5.69 MB (02.70%) -- window(chrome://browser/content/browser.xul)
│   │   │  │  ├──3.36 MB (01.59%) ++ (4 tiny)
│   │   │  │  └──2.33 MB (01.11%) ++ js-compartment([System Principal], about:blank)
│   │   │  └──0.16 MB (00.08%) ++ window(about:blank)
│   │   └──0.84 MB (00.40%) ++ js-zone(0x10e4a1800)
│   ├───2.85 MB (01.35%) -- top(chrome://browser/content/hiddenWindow.xul, id=1)
│   │   ├──2.53 MB (01.20%) ++ active
│   │   └──0.32 MB (00.15%) ++ js-zone(0x10cc0f000)
│   └───1.52 MB (00.72%) ++ (3 tiny)
├───29.72 MB (14.07%) -- add-ons/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/js-non-window/zones/zone(0x10038e800)/compartment([System Principal], jar:file:///Users/steve/Library/Application%20Support/Firefox/Profiles/wsfak2c9.default-1414472644129/extensions/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D.xpi!/bootstrap.js (from: resource://gre/modules/addons/XPIProvider.jsm:4176))
│   ├──29.49 MB (13.97%) -- classes
│   │  ├──20.44 MB (09.68%) -- class(Object)
│   │  │  ├──10.90 MB (05.16%) -- objects
│   │  │  │  ├───6.03 MB (02.86%) -- malloc-heap
│   │  │  │  │   ├──6.03 MB (02.86%) ── slots
│   │  │  │  │   └──0.00 MB (00.00%) ── elements/non-asm.js
│   │  │  │  └───4.87 MB (02.31%) ── gc-heap
│   │  │  └───9.53 MB (04.51%) -- shapes
│   │  │      ├──6.91 MB (03.27%) -- gc-heap
│   │  │      │  ├──6.85 MB (03.24%) ── dict
│   │  │      │  └──0.06 MB (00.03%) ++ (2 tiny)
│   │  │      └──2.62 MB (01.24%) -- malloc-heap
│   │  │         ├──2.60 MB (01.23%) ── dict-tables
│   │  │         └──0.02 MB (00.01%) ++ (2 tiny)
│   │  ├───8.74 MB (04.14%) -- class(Array)
│   │  │   ├──8.74 MB (04.14%) -- objects
│   │  │   │  ├──7.59 MB (03.60%) ── gc-heap
│   │  │   │  └──1.15 MB (00.54%) ++ malloc-heap
│   │  │   └──0.00 MB (00.00%) ++ shapes
│   │  └───0.31 MB (00.15%) ++ (4 tiny)
│   └───0.23 MB (00.11%) ++ (5 tiny)
├───20.99 MB (09.94%) -- heap-overhead
│   ├──15.88 MB (07.52%) ── bin-unused
│   ├───2.78 MB (01.32%) ── page-cache
│   ├───2.32 MB (01.10%) ── bookkeeping
│   └───0.00 MB (00.00%) ── waste
├────6.80 MB (03.22%) ++ (17 tiny)
├────4.31 MB (02.04%) -- workers/workers(chrome)
│    ├──2.34 MB (01.11%) ++ worker(resource://gre/modules/osfile/osfile_async_worker.js, 0x10e63a800)
│    └──1.96 MB (00.93%) ++ worker(resource:///modules/sessionstore/SessionWorker.js, 0x11d92dc00)
├────4.16 MB (01.97%) -- storage
│    ├──2.27 MB (01.08%) ++ prefix-set
│    └──1.88 MB (00.89%) ++ sqlite
├────2.82 MB (01.34%) -- images
│    ├──2.49 MB (01.18%) ++ chrome
│    └──0.33 MB (00.16%) ++ content
└────2.43 MB (01.15%) -- atom-tables
     ├──2.37 MB (01.12%) ── main
     └──0.06 MB (00.03%) ── static
@stevenwu

Here's how 'Explicit Allocations' change after each run with one 'Minimize memory usage',

174 MB -> 144 MB  no addons
219 MB -> 204 MB  ABP
202 MB -> 199 MB  uBlock
@gorhill

@stevenwu Ok I get your first step, i.e. the detached twitter window, but not the second step, i.e. when I minimize, there is no ghost windows left behind, no matter how often I try.

@gorhill

I'm with Firefox 34.0, while you say you are 34.0.5, who knows if this could be the reason.

Regarding the "Explicit allocations" your report, I roughly get the same values as yours for uBlock and no addons. However for ABP I get 245 MB. But I have all the default filter lists of uBlock see notes selected in ABP (acceptable ads disabled). Is this your case as well?

@fhoshino above also reported ghost windows, while said to be with Windows, but also using FF 34.0.5.

@stevenwu

For ABP, I had easylist without element hiding helpers. With easylist, I get 246 MB. Drops to 221 MB after minimizing memory.

@harshanvn

Am able to reproduce the ghost window/s with uBlock only on v34. No specific steps to follow, after using some time, i get (some times and some times not) ghost windows (after CC,GC, min).
System: Win 7 32 bit (office machine, so anonymized the report)

Attached memory report, which can be viewed thru firefox
https://docs.google.com/file/d/0BzwS1XH8I9buV2JqU2V0RlUwY3M/

@gorhill

Thanks @harshanvn. I suspect this could be related to the mutation observer in the content script. Last time I checked, ABP did not have a mutation observer. Under observer-service, I see two dead weak references. This matches the count of two ghosts windows. Maybe adding an explicit observer.disconnect() when a web page unloads is something to try. With Chromium, I expect everything is cleaned-up when a page goes away, but maybe that is different with Firefox. Even better, having cleanup code to remove all hooks for when a page shut down looks like a good ideas anyways.

@harshanvn

Ok, Good, to have the issue identified.

@gorhill

Ok, Good, to have the issue identified

No way, I said "I suspect this could". In developer speak, this means "need to investigate further", and it could easily lead nowhere.

@fhoshino

Though it might be I have started the mem usage bug report, but should we create a new ticket rather than continuing on this thread?

@gorhill

@fhoshino Actually my thought this morning is we should refrain from reporting problems, as per "Issues should be filed once @Deathamns decides it's ready for this". Myself I should have refrained from posting benchmarks in the thread itself (got carried away as it worked better than I expected -- on my side at least), it has become too noisy at this point.

@harshanvn

Sure gorhill. I understand. :)

@yoasif

I'm curious about one thing though. There is a constant crash in e10s enabled Nightly.
After the extension is installed, restart the browser and all tabs will crash because of the extension. However, if I disable the extension, and enable it (via the Add-ons Manger, without restarting the browser), then It will work normally. Can someone confirm this?

@Deathamns I can confirm this on the latest nightlies on my x64 Linux machine.

I have taken to disabling the plugin before shutting down (or restarting to update to the latest nightly), then re-enabling after the browser is restarted. It works fine after that.

@hollingsworthd

I suspect this could be related to the mutation observer in the content script.

@gorhill Assuming your hunch is correct (which I have not tested on FFv34), unregistering would be fine, but also you might specify ownsWeak=true (the last param of the addObserver method) --

https://github.com/Deathamns/uBlock/blob/ports/xpi/platform/firefox/frameModule.js
line 162: Services.obs.addObserver(this, 'document-element-inserted', false);

(Would need to add QueryInterface for Ci.nsISupportsWeakReference)
https://github.com/Deathamns/uBlock/blob/ports/xpi/platform/firefox/vapi-background.js
line 1034: Services.obs.addObserver(httpObserver, 'http-on-opening-request', false);
line 1035: // Services.obs.addObserver(httpObserver, 'http-on-modify-request', false);
line 1036: Services.obs.addObserver(httpObserver, 'http-on-examine-response', false);

Reference:
https://developer.mozilla.org/en-US/docs/Extensions/Common_causes_of_memory_leaks_in_extensions

@Deathamns

@yoasif OK, I see you did your part too. Hopefully someone will notice it.

@hollingsworthd Using weak references probably won't hurt, but I guess the problem is with the way I use sandboxes, and share extension APIs with them... I'll revisit that part.

@fhoshino

@Deathamns I tried the latest build but still getting the ghost windows problem.

@Deathamns

@fhoshino Nobody said that there was a change about that.

@sammcj

Is there anything the general public (i.e. me) can do to help you test the firefox build and provide feedback?

@Deathamns

I'll let you know when it's ready for testing.

@oliver006

Love the extension, great stuff.
I'm using Firefox 34.0 and the uBlock icon next to the google search bar is a bit too high and therefore adds extra spacing, see screenshot below. Can you reduce the height a bit?

screen shot 2014-12-29 at 1 58 59 pm

@hmac

On that topic, in 36.0a2 the number is offset in a similar manner and actually extends over the edge of the chrome:
screen shot 2014-12-29 at 14 00 05

This is a really great extension, thanks for the making the effort to port it to FF.

@my-password-is-password

Can the badge be placed at a certain position or does it just depend on the toolbar's height?

Here's my customized FF33.

ublockffbadge

Here's default FF37.

ublockffbadge2

@dserodio

@my-password-is-password how did you customize the toolbar to look like this?

@my-password-is-password

@dserodio

Australis Small Icon - https://addons.mozilla.org/en-US/firefox/addon/australis-small-icons/
Hide Caption Titlebar Plus - https://addons.mozilla.org/en-US/firefox/addon/hide-caption-titlebar-plus-sma/
Classic Theme Restorer - https://addons.mozilla.org/en-US/firefox/addon/classicthemerestorer/
url-addon-bar - https://addons.mozilla.org/en-US/firefox/addon/url-addon-bar/

You're going to have to mess around with the options for Classic Theme Restorer and Hide Caption Titlebar Plus.

@Deathamns

@oliver006 @h10n @my-password-is-password
The badge isn't properly implemented yet. I used a quick method just to see something.

@unknown--

If possible, the 'inline menu button' frame needs a bit of work.
screen shot 2014-12-30 at 1 42 16 pm

@xdmx

@Deathamns thank you so much for porting the probably chrome's best addon ever to firefox!

I wonder if you'd be able to update gorhill's checklist with the things that are completed, I think it'd help everyone to understand better at what point the porting is (and avoid reporting bugs that you may be already aware of because that part isn't finished yet)

I'm looking forward to download it once you'll think it's "good enough" and test it out

@ThePierrezou

@Deathamns Thank you :) :)

@Deathamns

@unknown--
Not much choice there, I can center or stretch it. I'll go with stretching.

@xdmx Pop-up blocking is non-existent yet, and the content-script implementation is ill (the cause of the above mentioned ghost windows, and why the element picker works only in newly opened tabs).
These are the essential parts that are not ready.

@sheepdestroyer

Sorry for making a bug report before you are ready to handle them :
When starting FF nightly with e10s enabled, ublock prevents any tab to load (they crash) and browser is unresponsive.
If starting FF with ublock disabled, then enabling it after a while, it works well as expected.
If e10s is disabled, there is no such problem at all.

@Mikey1993

@sheepdestroyer I can confirm. Same issue here.

@sheepdestroyer

Srry, went to report on bugzilla

@sheepdestroyer

this last build solves the e10s pb

@stsax

thx

@raphaeldore

Just wanted to pop in to say that I've been using the Firefox port of ublock for about a week without any issues. Marvellous add-on. Many thanks @Deathamns for the port and @gorhill for the extension.

@nobeh

Same here. The performance boost compared to other similar add-ons is very tangible.

@robbyrob4

anyone else get error file is corrupted when trying to install the one from mega.co?

@hmac

This is a build compiled from 72c23d4 (the current latest commit)
http://cl.ly/3L2Z1718082H/uBlock.xpi
It should be the same as the mega one.

@robbyrob4

@h10n thank you that did the trick!

@matachi

The eye icon shown in gorhill/uBlock#27 (comment) doesn't appear for me, why is that? eyeicon

@gorhill

@MaTachi: You need to enable the logging of net requests, from the Statistics tab in the dashboard. This will change eventually, you won't have to tell explicitly in advanced whether or not you want to log net requests.

@gitarra

Thanks, this looks promising!

Is IFRAME blocking implemented yet?

I'm getting the adzerk.net ad box on https://www.reddit.com/ which didnt happen using ABP. Havent noticed anything else yet.

@gorhill

@gitarra You should not get the adzerk.net ad. What filter lists are currently selected? Did you whitelist Reddit?

@gitarra

No whitelist, here's my filter lists: https://i.imgur.com/4y94OdJ.png

Worth noting, I am using NoScript and im getting their placeholder there which didnt happen using ABP: https://noscript.net/faq#qa4_8
(edited above link, wrong one originally)

https://i.imgur.com/T5Cci0r.png

###ad_main.noscriptPlaceholder[href^="https://static.adzerk.net/reddit/ads.html"] > .__noscriptPlaceholder__1 > .__noscriptPlaceholder__2

It seems µblock isnt blocking this ad, unlike ABP, could be an addon compatibility issue.

@gorhill

@gitarra It looks like NoScript is taking care of the iframe before uBlock, hence it ends up being rendered according to NoScript behavior. The ad is definitely blocked, but by NoScript. Disable NoScript and the ad will be blocked and collapsed by uBlock.

Maybe the order the extensions are installed decide which takes care of what first.

@gitarra

Disabled NoScript and it indeed was blocked, and there were 2 rulesets being used by µblock.

Enabled NoScript again and the placeholder is there and there is only 1 µblock ruleset used on the page.

I guess its just a cosmetic issue and nothing is actually transferred to/from adzerk.net.

Edited to add: I was originally confused by this as this was the exact behaviour I experienced when ABP was allowing ads (e.g. Non-intrusive ad list), apparently ABP was higher in priority as you said.

I wonder what defines this priority. Since NoScript is doing its magic before µblock, there are some cosmetic issues like this, but if this makes sure that NoScripts script surrogates work its all good.

In a perfect world, µblock would perform like ABP so that these cosmetic issues wouldnt happen, while making sure NoScripts surrogates work, but if that isnt possible I'd rather have working script surrogates with a few cosmetic issues.

@sheepdestroyer

isn't it the same 0.8.2.3? that what the version number says
edit : okay redownloaded and got 0.8.5.0, Thkx

@max-m

Hmm … just compiled from source and zipped it as µBlock.xpi.
about:addons lists it as 0.8.5.0 while the popup says 0.8.2.3.
Your version (mega link) shows up as 0.8.5.0 in the popup too, did you change anything (I was too lazy to make a diff :wink:)?

@gorhill

@max-m Same here, it shows 0.8.2.3 in the popup.

@Deathamns worrisome: there are scroll bars in the popup when expanding dynamic filtering... Is this a Firefox's popup limitation, or it's just something that needs fiddling? If it is a limitation, that kind of set back all the UI work. Might need a custom UI for Firefox? If we need custom, we could set a firefox class on the body element, and through CSS, for Firefox it would be one or the other pane, not both aside each other as with Chromium.

@max-m

Can confirm the scrollbars, in version 0.8.2.3 the popup worked for me and looked like it does in Chrome. :)

@mzur

Are there any plans on releasing the port to the official Mozilla add-on index? I'm using the very first version and it works flawlessly.

@jgeerds
@fwalch

Are there any plans on releasing the port to the official Mozilla add-on index? I'm using the very first version and it works flawlessly.

Let @Deathamns finish it first :wink:
Some parts are still missing (gorhill/uBlock#27 (comment)) or might need changes (e.g. gorhill/uBlock#27 (comment)).

@gorhill

Using the an example add-on in the SDK, I could definitely create a very large panel:

panel.Panel({
    width: 800,
    height: 60,
    contentURL: data.url("panel.html")
})

However it doesn't look uBlock's port is using this panel.Panel() object. I have a lot of catch up to do..

@gorhill

Looks like this worked, no idea whether it's clean or hacky (until I get more accustomed to FF addon SDK):

a

Changes in resizePopup:

var resizePopup = function() {
    var body = iframe.contentDocument.body;
    var width = body.clientWidth + 'px';
    var height = body.clientHeight + 'px';
    iframe.style.boxSizing = 'border-box';
    iframe.style.width = width;
    iframe.style.height = height;
    var node = panel;
    for (;;) {
        node.style.boxSizing = 'border-box';
        node.style.width = width;
        node.style.height = height;
        if ( node.nodeName === 'panelmultiview' ) {
            break;
        }
        node = node.parentNode;
    }
    updateTimer = null;
};

Explanation: we also need to walk up the tree to change parents' size too.

@freaktechnik

@gorhill from what I've seen @Deathamns port uses a minimal amount of actual SDK code and works in a lower level environement.

@Deathamns

@gitarra ABP uses a different technique to hide elements, which works only in Firefox.

@sheepdestroyer @max-m What you see in the Add-ons Manager is the correct. I just didn't update in the file.

@sheepdestroyer @max-m The pop-up has a max-width (at least the library I use to create pop-ups), but it could be bypassed.

@gorhill @freaktechnik There's no panel.Panel(), because I don't use the Addon SDK.

@gorhill Setting all parents' size is probably not a good idea. Those parents are common for other extension pop-ups too (I could be wrong though). Also if you put the pop-up in the menupanel (screenshot above), then that would be resized too.
One of the parent has a max-width property, probably suppressing that will be enough.

@fhoshino @stevenwu @harshanvn With the latest build, can you still reproduce the memory leaks that you described above?

@stevenwu

@Deathamns looks to be fixed. Thank you!

@Deathamns

@dsyo2008 We just talked about this above.

@alekksander

i don't know if it's a bug or im doing something wrong... go to any flickr group (for example: https://www.flickr.com/groups/desertnature/pool/page4 ) and try to use element picker to hide bar with info "You are viewing the beta version of our new groups experience". It will hide, but pops right back with every reload.

@Deathamns

@alekksander
This is not Firefox related, and it's not even a bug.

The parent element's id of that bar is changing every time you open the page.
Just make your filter less specific:
www.flickr.com##.ui-header.dark > .fluid.opt-out-bug

@Mikey1993

@masolit
This is what I'm getting (with Nightly build):
uBlock

@alekksander

i think i've done that before and it didn't work either... masted screw something.works now, thanks!

@fhoshino

@Deathamns
I've tested 0.8.5.0 for arround 6 hours, and confirmed the ghost window problem fixed.
I'll let you know if I encounter any other new issues.

@vv0909

Stupid question: what is the difference between +/- and ++/- - in the dynamic filtering panel?

@markerikson

Just installed 0.8.5.0, and I'm still seeing ghost windows listed in FF's about:memory. Seems to primarily be embedded Youtube clips.

@spacedingo

Been testing for a week now This is just perfect. Lower memory in task manager, and it does feel as light and fast as stock browser. I was envious of Chrome for having uBlock until now. : )

@Deathamns

@markerikson If you had earlier installed the extension, make sure to restart the browser (even if the extension is restartless - it's a browser bug), and test then.
You can open about:memory, hit Minimize memory usage, and find these entries.
A sandbox (with Expanded Principal) is created for every document, and they named as ublock:sb:id, and after that you can see for which document they were created.
At the js-main-runtime-compartments / user, you can see the principals (which are attached to sandboxes) listed in one place, so you can easily check how many sandbox is created by the extension.
If you see ghost windows, then check their URL and try to find them between these sandboxes/principals to make sure if µBlock holds them back from garbage collection.

Also, try to be a more specific. Describe how did you manage to get ghost windows, and of course where.
I've tried r/videos for "embedded YouTube clips", but none of them resulted ghost windows.

@wind0zer I knew about that one, it was present before.

@volia1

I know it's weird, but I can't embed puush url now in certain forum when I use ublock
Edit: Strangely, it works again. Anyway I use https://i.revthefox.co.uk/uBlock.xpi one when it didn't work but after install the mega.co.nz one, it just werks

@fhoshino

@Deathamns
FYI, I've tested 0.8.5.0 for more than 16 hours on release branch (win x86 34.0.5) and does not encounter ghost window problem, might switch to test nightly if I have time.

@markschultz

FYI I still I still get extra scroll bars in FF beta. I've used a clean profile and compiled the latest. It does display correctly in FF stable.
2015-01-11-225430_839x587_scrot

@Deathamns

@markschultz I pushed my changes from last night, try now.

@markschultz

@Deathamns
looks the same on ff beta and stable now, thanks.

@gorhill

I get a slightly truncated popup at the bottom with latest changes:

a

It does look like 4 pixels are missing at the bottom, and this happens to match the FF decoration at the top (might be a coincidence).

Firefox 34 on Linux Mint Cinnamon. I suspect box-sizing.

@max-m

Just pulled your latest changes (131d810), the settings page doesn't work, the page just looks like this:
blocksettings

Also the µBlock tooltip button is gone; Firefox’s browser console didn’t show any errors.

Edit: I’m using the Firefox Developer Edition in version 36.0a2

Edit: Link removed

@gorhill

@max-m Where did you get that file? It's improperly built, looks like it was build using zip uBlock.xpi * instead of zip uBlock.xpi -r *.

Edit: Ok I see you built it yourself. You forgot -r (recursive) option when you zipped.

@max-m

Whoops, right, I have missed the -r :blush:
(interesting that it didn’t blow up)

Settings work again, the button shows up, but the tooltip still has got scrollbars.

@gorhill

@max-m What command you used to pull the changes?

@max-m

Simple git pull on @Deathamns fork and his ports/xpi branch.
Latest commit of my local clone is 131d810.
Everything should be ok as long as he pushed everything :smile:

@gorhill

@max-m You are best-placed to investigate why you do not seem to have gotten the changes.

@gorhill

@Deathamns reversing the order to:

panel.style.height = iframe.style.height = body.clientHeight + 'px';
panel.style.width = iframe.style.width = body.clientWidth + 'px';

fixed the problem on my side. Without this, whatever I tried (and I did try a lot of things) the height would just not change at all, resulting in the popup being truncated at the bottom.

That kind of fix looks arbitrary, it's worrisome to have to count on luck to fix something.

@Deathamns

@gorhill "and I did try a lot of things" - This is the summary of my whole experience with extension development in Firefox.

Anyway, currently the Firefox port has everything (in some form) that the Chrome version, so the rest should be mostly polishing or fixing (i.e., we can call it beta at this moment).
I pushed all my changes, and if you'll have the time, review the code, because I would like to post it to master (tired of rebasing).

@gorhill

Just merge all your changes, we can review as time permit afterward + testing etc. I would like to be able to post here an official release for Firefox as there is a strong demand for this and not everybody is able to build it.

@Moleculor

I'm new-ish to github, etc, but am among the many looking for an obtainable version of µBlock. Where will such an 'official' beta version be announced/made available? I've already subscribed to this particular issue discussion thread, if this is where it'll be.

@ghost

Any chance of a version for Pale Moon?

@Deathamns

@gorhill rebased / merged with master / pushed to gorhill/uBlock - if that is what you meant by merging.

@toojunk If you know someone who would do it.

@gitarra

Noticed that if you turn advanced user mode on and back off again tooltip functionality isnt restored, you are stuck with no tooltips. Tested with the big green power button tooltip.

@Deathamns "ABP uses a different technique to hide elements, which works only in Firefox."

Maybe I can live with those noscript elements on pages then, even though it isnt pretty.

@gorhill

@Deathamns so can I go ahead and create an official release in the releases section? (alpha?, beta?)

@gorhill

@gitarra Did you try to change the order of installation? (i.e. NoScript after uBlock? On Chromium the order matters)

Edit: Actually, what is wrong with me, I can just try it myself

Edit: Doesn't look like it helps, I still see NoScript placeholders

Edit: Ok I see, the placeholder is not even a frame, it's a mere a tag created by NoScript, which href is the src attribute of the blocked iframe. Need to think, maybe something can be done.

<a style="width: 300px; height: 280px; max-width: 32px; max-height: 32px;" class="__noscriptPlaceholder__ " title="<IFRAME>, text/html@http://static.adzerk.net/reddit/ads.html?sr=-reddit.com,loggedout&amp;bust2#http://www.reddit.com" href="http://static.adzerk.net/reddit/ads.html?sr=-reddit.com,loggedout&amp;bust2#http://www.reddit.com" id="ad_main"><div style="align-content: stretch; align-items: stretch; align-self: stretch; animation: 0s cubic-bezier(0.25, 0.1, 0.25, 1) 0s normal none 1 running none; backface-visibility: visible; background: none repeat scroll 0% 0% transparent; background-blend-mode: normal; border: 0px none rgb(0, 0, 0); border-radius: 0px; border-collapse: separate; border-spacing: 0px; box-decoration-break: slice; box-shadow: none; box-sizing: content-box; caption-side: top; clear: none; clip: auto; color: rgb(0, 0, 0); content: none; counter-increment: none; counter-reset: none; cursor: auto; direction: ltr; display: none; empty-cells: show; flex: 0 1 auto; flex-flow: row nowrap; float: none; font: 400 10px/13px verdana,arial,helvetica,sans-serif; height: 280px; image-orientation: 0deg; ime-mode: auto; justify-content: flex-start; letter-spacing: normal; list-style: outside none disc; margin: 0px; marker-offset: auto; max-height: 32px; max-width: 32px; min-height: 0px; min-width: 0px; mix-blend-mode: normal; opacity: 1; order: 0; outline: 0px none rgb(0, 0, 0); outline-offset: 0px; overflow: hidden; padding: 0px; page-break-after: auto; page-break-before: auto; page-break-inside: auto; perspective: none; perspective-origin: 50% 50%; pointer-events: auto; quotes: &quot;“&quot; &quot;”&quot; &quot;‘&quot; &quot;’&quot;; resize: none; table-layout: auto; text-align: start; text-indent: 0px; text-overflow: clip; text-shadow: none; text-transform: none; transform: none; transform-origin: 50% 50% 0px; transform-style: flat; transition: all 0s cubic-bezier(0.25, 0.1, 0.25, 1) 0s; unicode-bidi: normal; vertical-align: baseline; visibility: visible; white-space: normal; width: 300px; word-break: normal; word-spacing: 0px; word-wrap: normal; z-index: auto; -moz-appearance: none; -moz-binding: none; -moz-box-align: stretch; -moz-box-direction: normal; -moz-box-flex: 0; -moz-box-ordinal-group: 1; -moz-box-orient: horizontal; -moz-box-pack: start; -moz-columns: auto auto; -moz-column-fill: balance; -moz-column-gap: 10px; -moz-column-rule: 0px none rgb(0, 0, 0); -moz-float-edge: content-box; -moz-force-broken-image-icon: 0; -moz-hyphens: manual; -moz-image-region: auto; -moz-orient: auto; -moz-outline-radius: 0px; -moz-stack-sizing: stretch-to-fit; -moz-tab-size: 8; -moz-text-align-last: auto; -moz-text-decoration-color: rgb(0, 0, 0); -moz-text-decoration-line: none; -moz-text-decoration-style: solid; -moz-text-size-adjust: auto; -moz-user-focus: none; -moz-user-input: auto; -moz-user-modify: read-only; -moz-user-select: auto; -moz-window-shadow: default; clip-path: none; clip-rule: nonzero; color-interpolation: srgb; color-interpolation-filters: linearrgb; dominant-baseline: auto; fill: rgb(0, 0, 0); fill-opacity: 1; fill-rule: nonzero; filter: none; flood-color: rgb(0, 0, 0); flood-opacity: 1; image-rendering: auto; lighting-color: rgb(255, 255, 255); marker: none; mask: none; paint-order: normal; shape-rendering: auto; stop-color: rgb(0, 0, 0); stop-opacity: 1; stroke: none; stroke-dasharray: none; stroke-dashoffset: 0px; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 4; stroke-opacity: 1; stroke-width: 1px; text-anchor: start; text-rendering: auto; vector-effect: none;" class="__noscriptPlaceholder__1"><div class="closeButton"></div><div style="background-position: right bottom; background-image: url(&quot;moz-icon://noscript?size=16&amp;contentType=text/html&quot;);" class="__noscriptPlaceholder__2"></div></div></a>

Edit: Looks to me the placeholders show with uBlock not because ABP works differently (though it does), but because NoScript is aware of ABP.

@ghost

On the 3rd party filters list in the Dashboard, the Save button has disappeared. Consequently unable to make changes in the lists. On 0.8.5.3, Firefox release channel.

@Deathamns

@gitarra Try to block iframes with µBlock instead of NoScript.

no tooltip

Can confirm. In Chrome too.

@gorhill I'll write later about the current state, so we can decide about a release.

@kintpuash Can confirm. Only in Firefox.

@gitarra

@gorhill Sounds like that would break NoScript's script surrogates if a script is blocked by µblock before NoScript gets to see it.
I'd rather have working script surrogates than no visual clutter, if there is no nice way to get both.

Edit: Indeed looks like blanket running µblock before NoScript would break script surrogates:

https://hackademix.net/2009/01/25/surrogate-scripts-vs-google-analytics/#comment-10617

@harshanvn

@Deathamns not sure if the below bug is preset in latest build for Firefox, but it is in this build..
gorhill/uBlock#27 (comment)
Hence reporting. If its resolved in latest build, please ignore.

If you have multiple tabs, try selecting "request log" icon from popup ui -
expected result: it has to open request logger, and the tab in the drop down should be from where the request initiated.
actual result: first tab in the drop down is selected in the network request logger.

Works fine in Chrome though.

@harshanvn

And a general question -
Do we really need to have NoScript, if one is using uBlock with Dynamic Filtering.
I think it will add XSS protection. Anything else?

@gorhill

@harshanvn Re. "Do we really need tp have NoScript": personal choice. NoScript offers more granularity script-wise. With uBlock, you can dynamically block everything from a specific hostname (including scripts), or scripts on a 1st/3rd-party basis, so there is less granularity. Some users will be fine with this, some not. Can't give blanket advise, to each his own.

@Arockalypto

This port isn't working properly with SeaMonkey. The icon doesn't appear and the 3rd-party filters tab is nonfunctional. Same problems occur on a fresh profile.

@gorhill

Please, can we hold on reporting issues until there is an official release? This thread will grow indefinitely and all reported issues will be lost in the sea of comments.

@Deathamns

@harshanvn That issue was reported before, but seems like the poster deleted the comment.
I knew about it, but probably I won't fix it if @gorhill wants to improve on it anyway.

@Arockalypto SeaMonkey is considered a lower than FIrefox 29 version, so it's not supported (at least yet).

@josteink

Seconding @gorhill. This github issue is about creating a Firefox-port in the first-place. It's not a bug-tracking issue for the finished Firefox-port.

The amount of email and messages generated from this single issue so far is pretty mind-boggling :)

@Betsy25

Since @Deathamns xpi port got integrated into @gorhill his repository, I created a little .cmd script, that supposed to update my local copy to the latest commit, however the line "git pull" doens't seems to detect and doesn't pull the new commits and always returns "Already up-to-date." for some reason.
I'm a noob in git-land, can anyone please enlighten me why "git pull" doesn't do what I'm trying to achieve please ? Thanks a 1000 times !

echo git clone https://github.com/gorhill/uBlock
cd uBlock
git checkout master
git pull origin master
sh tools/make-firefox.sh
cd dist/build/uBlock.firefox/
("C:\Program Files\7-Zip\7z.exe" a -tzip C:\Users\Betsy\Source\Repos\uBlock.xpi -r C:\Users\Betsy\Source\Repos\uBlock\dist\build\uBlock.firefox/*)

BTW, don't mind the echo on the first line, I echoed it out after the initial clone locally.
EDIT: Script updated, thanks @r-a-y !
EDIT: (2015-01-15) Updated script since the source is now on @gorhill his repository by default.

@berryman13

Thank you so much Betsy25 - straightforward and works on windows.

http://msysgit.github.io/ Here's the link to adding git and other UNIX tools to the windows command shell, for others who haven't added it. (I haven't needed to, whenever I do development I reboot into linux)

@Betsy25

@berryman13 No need to thank. :)
The line git pull for some reason doesn't do what I suspect it would do, it doesn't "see" any new commits :confused:

@r-a-y
@Betsy25

Thanks r-a-y :+1:

@horna12

Where can i download uBlock.xpi updates for Firefox?

@Betsy25

horna,

If you want to create it yourself on windows you would have a couple of tools to install, and 15mins of time installing them.
GitHub Shell
Python for Windows
7-zip for Windows

Then, after installing all these 3, in the directory that GitHub should have created ( C:\Users*YourComputerUserNameHere*\Source\Repos )
create a "update-ublock.cmd" there, open it in an editor and enter the codelines as posted here, and save.
!!!!! Some things for you to change when you copy&paste that code in that .cmd file
- on the last line of the script, again change the "Betsy" strings to the correct directory that is present on your system.

  • remove "echo" from the 1st line, and put it back there after you have successfully ran the full .cmd for the first time and thus cloned it for the first time to your Repo directory.
    • Now run "Git Shell" which normally should be available as an icon on your desktop. now, at the dos-like prompt, enter the following, followed by the enter key : ./update-ublock

If everything went correctly, and the uBlock.xpi created works as it should after you drag&drop it into FF, you must now precede the first line with "echo " in front of it, or you could delete the first line completely, although I prefer just putting echo in front of first line in case you might need to clone again later for some reason.

If you need more help without cluttering this thread (which might be a little OT to the intentions of this thread, you can contact me at zombulla14@gmail.com

Regards.

EDIT: Hopefully @gorhill will make things way much more easier for us soon, so all of us FF users can finally start to enjoy an exceptional, non memory and CPU hogging adblocker also. :smiley:

@gorhill

Hopefully @gorhill will make things way much more easier for us soon

@Deathamns will decide when a Firefox version is ripe for an official release.

@alekksander

Thanks!

@Deathamns

Notes for an official release / things that aren't working well:

  • For many resources the Firefox version will report double hits on the badge of the toolbar button or in the network log. This is a Firefox thing, and probably this issue is related.

  • The badge doesn't look good on different systems (OS X for example, see above).
    It should look okay for those who use Firefox 36+, but even there moving the toolbar button to the menu-panel may mess it up (both the badge and the menu-panel).

  • The badge number disappears when navigating through bfcache.

  • If the current extension ID will not be changed, and custom update URL won't be specified for the pre-release, then once the extension will be sent to AMO, everyone will be automatically updated to that version.

  • Pop-up blocking is not thoroughly tested. I basically made a few random examples for myself, and only tested those.

  • I removed my ports/xpi branch, since the code has been pushed to the main project. If you had install scripts, then update their URLs.

@gorhill So, let it be your choice if you want to make a release.

@gorhill

@Deathamns Today I went to my regular perusing of Adblock Plus issues (to pre-emptively find out whether uBlock suffers same reported issues), and I found one such issue which uBlock also suffers on Firefox, which is the handling of IDNs.

There is the cosmetic aspect, easily taken care of (like it is already in uMatrix), but the other aspect is a bit more work, which is that Firefox won't normalize URLs to punycode when they are passed to extensions. So I fixed this in Firefox's vAPI.

There is one last glitch though which is the URLs sent from the content scripts (these are other entry points into the platform-independent code) and this is where I am at now. In order to try to not penalize one platform because if the wrinkles of another one, I need to create a vAPI call to normalize URL. For Chromium/Safari, it just return the passed value, for Firefox, I will use a URL object, extract the hostname, punycode it, than sent back the normalize URL.

After I am done and you agree the changes are fine, then I will publish an official beta release, along with your notes. Hopefully before the end of the day.

@gorhill

I want to wait for @Deathamns' feedback about the changes I made, so that will have to wait tomorrow.

@harshanvn

That issue was reported before, but seems like the poster deleted the comment.
I knew about it, but probably I won't fix it if @gorhill wants to improve on it anyway.

@Deathamns thanks for the update. lets hope issue can be resolved with official release version.

updated version 0.8.5.3 https://mega.co.nz/#!v5UUkCwA!j8E4CXGMuEO-2YPG3r4dEUKnRTWwoKJLbRzvIxzADCA

@masolit thanks for the link, i am currently using your build. Works far better than the previous one. B/w what is the theme you were using for for firefox, i believe you are on windows.

With uBlock, you can dynamically block everything from a specific hostname (including scripts), or scripts on a 1st/3rd-party basis, so there is less granularity.

@gorhill thanks for your input. however i have few other questions with this vs that. I will create a thread at wilders for commuinity input. i dont want to pollute anything more with the off topics

@farag2

After installing the latest version links to filters has disappeared in setu menu. And by clicking on filter link for example Anti-Adblock Killer | Reek opens chrome://ublock/content/asset-viewer.html?url=null instead of pure link to txt file.

@Deathamns

@farag2 That has been fixed already, so you probably didn't install the "latest version", or it wasn't built from the current code.

@farag2

I downloaded from this one: https://mega.co.nz/#!v5UUkCwA!j8E4CXGMuEO-2YPG3r4dEUKnRTWwoKJLbRzvIxzADCA I couldn't compile from source code. Can you please upload the latest one then?

@Deathamns

@farag2 Hopefully there will be an official release later this day, you should wait for that.

@farag2

Thanks. Looking forward to it!

@gorhill

Pop-up blocking is not thoroughly tested. I basically made a few random examples for myself, and only tested those

I checked with the case in issue #58, and the whole tab from where the popup originate ends up being closed, aside the popup itself. Wondering if it's a trivial fix.

@Deathamns

@gorhill Well, that was unexpected. The following was true when the tab closed:
window === window.opener.
I don't really understand how could that be true (it's like it opened itself), or how can even a non-popup window have that opener property.
Edit: maybe the site wrote it over, tricky.

@gorhill

You think we should hold a beta release over this? There is a lot of quick assessments out there ("ha! can't block popup!!1! garbage!!!"), and it's not something I look forward too.

@fhoshino

I'm not a dev but I suggest not publishing on AMO yet.
Just give a nightly build here and polish it till ready.

@darklajid

From the sidelines, throwing 2 cc in here: Yes. Hold.
As soon as you're putting out a release, people will install it in a rush and .. complain.

This thread is already quite noisy with regular unofficial builds, requests for weird FF related other browsers etc.. I'd assume this would explode as soon as you put up an xpi file in a public/accessible place.

Interested third parties can build it for now and follow along, wait for this bug to be resolved with a release. Knowing that everything is work in progress and far from done.

@gorhill

@Deathamns just adding:

if ( tabId === sourceTabId ) {
    return false;
}

in handlePopup() fixed the problem. If the tab ids are the same, it can't be a popup isn't?

Edit: I could test for this in the platform independent code instead I suppose.

@Deathamns

@gorhill It is ready for a beta. Of course, the question is how many people will understand that it is.
But this is the point of these kind of releases, to find bugs.
Also, I already said that it should be your decision.

With my last post, I just wanted to say that it has been fixed, and already pushed.
But for the record, it wasn't enough just checking the tab ids, because many tabs could have the same URL (from where the sourceTabId comes).

@gorhill

Yes, looks like it's fixed. I tried this other case documented in uBlock's filters, http://putlocker.is/, and it worked fine there too.

@Deathamns

Actually I'll will open an issue with the test cases I used, since Chrome didn't seem to block them all, then you can see what I've tried.

@rodalpho

I suggest calling it a "technical alpha" when you put it up on AMO. Many people expect betas to be finished products; the word's meaning has changed over the years when Gmail was in beta for a decade, etc. They don't approach alphas the same way and would be much more accepting of issues.

I would love to use uBlock on Firefox, but I'm not going to build the XPI myself or download off some dodgy file sharing site. If it was on AMO I'd install it right away.

@gorhill

It's up there: https://github.com/gorhill/uBlock/releases/tag/0.8.5.4-beta.0

I am starting to use that travis tool, so now I need to fill in the details.

@gorhill gorhill closed this
@gorhill

@rodalpho "betas to be finished products"

Well I have no doubt uBlock fits in that category, it's just that the Firefox's portion is in need of real-life use now. Otherwise the whole platform independent portion as been in use for months now.

@littleboy62

Hi everyone.

Does the extension will be developed for Palemoon ?

I've tried to install this extension ( here ) : not compatible palemoon 25.0

But look this message.

So, i've edited the file indicated in this topic.
The extension is installed but not functionnal.

http://i.imgur.com/IJE8HLq.png
http://i.imgur.com/DSQQlVd.png
http://i.imgur.com/1NX6AHi.png
http://i.imgur.com/qJQehXJ.png
http://i.imgur.com/fRupC9u.png
http://i.imgur.com/nLn72wV.png

And the extension doesn't appear in palemoon.

Too bad PaleMoon doesn't react in the same way as Firefox.
Normal, not same "development"

Best regards,
thomas

@LL25255252

@littleboy62 ,
You can try to install these 2 addons to block ads which I use in Firefox (if you do, please tell me if they work in your Palemoon browser).

μ Adblock (not to confuse with μ block ):
https://addons.mozilla.org/en-US/firefox/addon/micro-adblock/?src=api

and Flash Control:
https://addons.mozilla.org/en-US/firefox/addon/flash-control/?src=api

Both don't use much memory. and cpu :
http://i.imgur.com/PLGWdMW.png

@wasd--

I noticed that some pages display the "ads" or blocked elements for a sec and then they disappear. It should do that?
Using latest beta and Firefox 35

@gorhill

@wasd-- Impossible to answer properly if you do not provide a URL where this occurs.

@spacedingo

@littleboy62 uBlock for firefox works only from FF 29 and above. I think Palemoon is based on a version before FF 29. gorhill/uBlock#27 (comment)

@wasd--

@gorhill For example here http://www.formulatv.com at the top the bar have social buttons, I can see them for a sec and then disappear. I have the two fanboys Antisocial filters that should block them.

I noticed it too on xda forums with social buttons too that are next to "Themer" and "Swappa"

@gorhill

@wasd-- Yes it is normal, given how uBlock works. More info:

  • This happens only the first time for a given site, i.e you won't see this after the first visit for other pages on the same site
  • You can get around this behavior by creating a filter specific to the site, i.e. www.formulatv.com###social in the current case
@littleboy62

Hi Spacedingo and everyone

First thank for your answer. ( here )
(and thank too others)

I think you misread my initial question.
I misspoke, certainly. (I'm french ^^)

My initial question : Is that the extension will come on PaleMoon?
The rest of the message was only tests.

Anyway, thank you for all answers.

Best regards,
Thomas

@wasd--

@gorhill Ok, thanks ;)

Awesome work btw!

@gorhill

Is that the extension will come on PaleMoon

If someone work for a PaleMoon version.

I will be locking this thread shortly, it's creating a constant stream of notifications for an issue that was closed yesterday.

@stefanocaselli

Hi,
do you plan to support android phones? (adblock plus works on firefox for android)
Thanks!

@greduan

@stefanocaselli This should probably be on a new issue. This one is going to be locked.

@roberto68

so I try to drag the folder and the zip file also to addon manager and firefox - that it's corrupt (I'm on linux)

@brwolfgang

Hi there @roberto68, if I get it right you are trying to install the addon on you linux PC, right? You can go to File->Open file and open the XPI file (and not the zip) you've downloaded from here, Firefox will then ask if you want to install the addon like any other.

@roberto68

thanks it works

@Deathamns Deathamns locked and limited conversation to collaborators
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Something went wrong with that request. Please try again.