
Loading…
[Firefox on Android] [Request] PageAction to access popup and dashboard #1054
I'm not entirely convinced that a page action is the appropriate place for uBlock... given the extremely limited space available, I would suggest that it is more for commands that apply for only a few pages, and need to advertise their availability in those situations. uBlock will be present on every page, and therefore always showing an icon there would be wasting the valuable space. I think uBlock more properly belongs on the menu, rather than in the URL bar.
I don't want to get rid of uBlock in the menu. I would just like a quicker way to get to the popups. Maybe an option in Settings like there is for "Make use of context menu where appropriate" for people who do want uBlock in the URL bar? uBlock is the extension I interact with the most and the only extension on Firefox that really matters, so it wouldn't be wasting valuable space for me.
An option for this feature would be great - having ublock open in a separate tab can make it difficult to get back to the tab you opened it from.
This proposal has nothing to do with opening it in a separate tab. It is just about changing the button from appearing in the tools menu to appearing inside the URL bar - the effect of clicking it would still be the same.
https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/PageActions.jsm
It adds a ublock icon to the location bar where you can access popup easily. You can also access the dashboard by long pressing on the icon.
On my phone I can have a max of 2 icons displayed in the location bar. If theres more it adds a dropdown menu where you can still access them.

This is the code I used but I don't know if this is the proper way to do it. I put the code at https://github.com/gorhill/uBlock/blob/master/platform/firefox/vapi-background.js#L1451 . I also didn't know how to add the icon without using a base64 string. Saw this http://stackoverflow.com/questions/26024959/how-do-i-provide-icons-for-firefox-android-sdk where he said he was only able to use either base64 or drawable for PageActions. Maybe @AlexVallat could implement this the correct way.