Rayquaza01 / HistoryCleaner

Firefox addon that deletes history older than a specified amount of days.
MIT License
78 stars 6 forks source link

Add Firefox for Android Support (History API is not available in Firefox for Android currently) #22

Open towlie opened 2 years ago

towlie commented 2 years ago

Firefox Nightly for Android supports installing every extension by following their guide: https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly/

From what I have seen a lot of extensions work now. But this one doesn't. It installs but it's not able to delete the history. (No error message shown)

So I ask you if it's possible to make it work?

Rayquaza01 commented 2 years ago

The history WebExtension API does not seem to be supported in Firefox for Android (see this compatibility chart). The history API is (of course) needed to delete history. Once the history API lands in Firefox for Android, it should work. (Though the options page for the extension will need to be reworked. It's not at all optimized for mobile.)

Here's the error from the remote debugger in Nightly on desktop showing that the history permission is invalid: Screenshot from 2022-03-01 22-04-32

towlie commented 2 years ago

Thanks. So it will work without updating the extension if they add the history API to Firefox for Android.

CharmCityCrab commented 1 year ago

As an aside, if this extension ever does become compatible with mobile, it might be a good idea to file an issue over on the Iceraven github requesting that it be added to Iceraven's default add-on list.

Iceraven includes a ton of "extra" add-ons on its default list whereas Firefox stable only has perhaps a dozen or so, and Iceraven offers easy access to them without the weird "cheat code" type stuff you have to do on Firefox nightly like clicking an icon a certain number time times and a bunch of other stuff. So, Iceraven users are much more likely than users of any other Fenix based browser to explore beyond Firefox stable's core list, because you don't need any special knowledge to install any add-ons on the default Iceraven list while using Iceraven (Of which there must be 100 or so).

However, just as importantly for an extension developer, the Iceraven list is actually very popular among users of Fenix-based browsers other than Iceraven, who, if their variant of Fenix supports it, can and often do add in Iceraven's add-on list to their existing browsers. I've got to think people who go to enough trouble to add a list like that manually to their browser install are more likely to use some of the extra extensions than other users of the same browser.

Iceraven already includes "Expire History By Days" on it's list, so "History Cleaner", updated much more recently and providing similar functionality would be a popular slam dunk type of extension to add when everything matches up compatibility wise.

If the time comes when Mozilla allows this add-on the access it needs to the browser to do what it sets out to do, but no one else files an issue requesting that it be added it to Iceraven's list at that time, I can file an issue recommending they do so, provided that someone tells me what's going on. :)

ghost commented 1 year ago

Firefox Nightly for Android supports installing every extension by following their guide: https://blog.mozilla.org/addons/2020/09/29/expanded-extension-support-in-firefox-for-android-nightly/

As does this fork:

https://gitlab.com/relan/fennecbuild/
https://f-droid.org/packages/org.mozilla.fennec_fdroid/

I'd change the title to "Firefox support" for clarity, to my knowledge the full addon support isn't intended as nightly-only feature.

ghost commented 1 year ago

Iceraven already includes "Expire History By Days" on it's list

@CharmCityCrab Which presumably doesn't currently work on Firefox Android due to lacking mobile history API?

https://addons.mozilla.org/en-US/firefox/addon/expire-history-by-days/

CharmCityCrab commented 1 year ago

I'd change the title to "Firefox support" for clarity, to my knowledge the full addon support isn't intended as nightly-only feature.

Firefox supports significantly fewer than twenty add-ons for use on their stable Android browser (Up from seven a few years ago, but down from thousands just prior to a few years ago).

Though you can use their complicated secret formula to get access to more extensions on nightly (Their most unstable release) and they were talking about expanding it to their beta browser (and may have done so), they have not expanded it to the stable browser and to my knowledge have announced no plans to do so in the future. They've been pretty clear about their lack of interest in giving users what they want when it comes to extensions.

When they first cut down to 7 extensions in the summer of 2020, they said almost all of the old extensions couldn't be made to work with the new version of their browser even if developers rewrote the browser code a bit. This was untrue. Iceraven's lead developer made a working browser based on the then-latest Firefox browser in just a couple hours that supported tons of extensions. Then the Firefox people said more extensions were coming to their browser and, well, it's been three years, and it's maybe a dozen total- something like that.

In those three years, Firefox eventually did add broad extension support for Nightly, but with tons of caveats like Mozilla accounts and all sorts of extra steps, as well as defacto capping the number of users who could access the extensions by not having most of them work with their most popular browser, making continuing ongoing support from extension developers less likely.

They also made it clear that including it in Nightly did not mean it was a feature they intended to have filter down to stable eventually, the way most things in nightly are at least being considered for. Instead, there were insinuations that extensions in general are too complicated or insecure for the average user to be trusted with beyond a very small very curated number. Really, they are using extensions as bait to force you to test the not ready for prime time aspects of their browser on an ongoing basis.

Iceraven, a fork of a Mozilla product but made independently, is based on the stable version of Fenix (The code name for Firefox 69-the most recent version and beyond), includes some of its own exclusive customization options, and offers easy to use straight out of the box access to 50-100 extensions and about:config without jumping through any hoops.

With that said, I think it's possible to do the same thing Firefox Nightly users do to get access to an even wider set of extensions on Iceraven. Of course, that would involve doing all the same things Firefox requires of it's nightly users, including keeping a Mozilla account on the web with all your extensions listed. Iceraven offers the largest list of extensions that are just there to add- no account sign-ups or hoop jumping required. In fact, a lot of users of some of those other browsers input the number identifier of Iceraven's custom list of extensions, because Iceraven's list is considered that good. Similarly, Iceraven users could input a different number identifier of a different list of extensions in if they wanted to, but usually don't.

ghost commented 1 year ago

@CharmCityCrab Thanks for the reply. To me one of the largest issues in Firefox Fenix is the inability to always use the private browsing mode (it's common to accidentally open standard tabs), and clearing cookies & site data requires pressing 'quit' in the menu. But at least there's the option to automatically close tabs (after X days)...

If you happen to know an Android browser which can automatically clear the website data, I'm very interested. I also prefer saving no browsing history on mobile.

Rayquaza01 commented 1 year ago

Which presumably doesn't currently work on Firefox Android due to lacking mobile history API?

@07416 I just double checked this, and no, Expire History by Days (and by extension, History Cleaner) does not work on Iceraven. The history API is still missing and it shows the same warning as Firefox Nightly in the remote debugger.

ghost commented 4 weeks ago

Since the mainstream Android app now allows any (supported) extension to be installed too, please edit Nightly out of the title of this issue.