Showing posts with label Firefox for Android. Show all posts
Showing posts with label Firefox for Android. Show all posts
Monday, June 28, 2021
The modern wonders of smartphone tech
So I watched footy yesterday between Wales and Denmark (Denmark won :), and the football pitch showed ads for some large South-East Asian brands — in non-Latin characters.
So thanks to Firefox, Android 9.0 (which is the latest version of Android that I have right now), and Google Lens, I was able to do several things.
Unlike the default ETV* apps of the Estonian national broadcaster ERR that do not allow making screenshots (in modern Android, apparently), Firefox did permit screenshots when using the browser in Android to watch the official ETV livestream.
I could then make screenshots of the ads flicking on the edges of the green pitch, and use Google Lens in Google Photos to find out what some of the ads were.
So, one was for a SE Asian brand of air conditioners with a non-Latin slogan, and the other displayed a slogan for some kind of SE Asian blockchain technology/solution.
— Google Lens offered a button to Google Translate, and another to play that text back in the original language.
Wow, I say.
Saturday, April 10, 2021
Which Gecko-based browser to choose for Android?
Published initially as a reddit post.
Much depends on what functionality you want.
There are three or four types of Gecko-based browsers, and one can have two or three, depending on desired functionality. In all cases, you'll have to switch off automatic app updates in order to prevent your device automatically moving to a version with less functionality.
If you want the latest and dark mode, there's Firefox or Fennec (the latter with a delay).
If you want automatic updates to most apps from the Google Play Store, and the latest Gecko-based browser, pick Firefox, and then Fennec or IceCat from the F-Droid app, where you can switch automatic updates off.
In this scenario, where you'd want to stick to a certain release, pick a version of Fennec F-Droid, and/or GNU IceCat. Fennec has more versions to choose from; IceCat has less versions, as it tends to stick to ESR branches.
If you want legacy/XUL add-ons, you might have to consider Firefox/Fennec 56.0 as the last version.
If you want the latest branch that still has about:config, pick version 68.x esr (extended support release). It has support for add-ons available at addons.mozilla.org that are no longer supported by the latest Firefox due to changes to the extension framework (yet again).
68.x esr also supports viewing local HTML files, as I haven't been able to do this with the latest Firefox.
Firefox 43.0 (really legacy) and older still support cookie prompting via extension, and has slightly better support certain other legacy extensions. But this is a really old version.
Saturday, February 16, 2019
Looking back on an advert: Samsung Galaxy Mini II vs Nokia Asha 311
Five years ago (as of February 2019), this photo comparing Samsung Galaxy Mini II and Nokia Asha 311 caught my eye. On the surface, both had comparable specifications to what I wanted, but I'd preferred a Nokia phone simply on the strength of the Nokia brand. What follows, is a comment that I recently posted.
When my primary phone was a flip-phone with just a 2 Mpix camera, then I dreamed of getting that Nokia Asha 311 one day, as it had all of the new features that I thought I could want.
A young relative got that one for his birthday, but lost it soon after under a tree in the countryside (it was found a year later in a bit disheveled state, but it still worked).
In late 2013, I got the Galaxy Mini II as a hand-me-down (used). It's got a better camera than the flip phone (3.15 Mpix), and comes with Android 2.3 Gingerbread, ended up with a longer useable lifetime and with more functionality and apps than I would have had with Asha 311.
For instance, I could install Firefox on Android, and that extended the Mini II's useable lifetime for quite a bit longer than it would with just the default Android browser.
If equipped with NoScript, and configured properly, then Firefox is the browser that can prevent the planned obsolescence of many old Androids.
When several apps stopped working on Android 2.3, I could use their mobile web equivalents in Firefox. Even Skype for Web, which needed specific work to function in Firefox on Gingerbread.
Five years after I got the Mini II, by Christmas 2018, I finally got an upgrade, which is a hand-me-down from an elder relative, who got a substantial phone upgrade themselves, and had no need for the old phone.
The 'newer' phone has almost the same specs, but a 5 Mpix camera, and had Android 4.0.3 Ice Cream Sandwich (ICS), which I'd upgraded it to Android 4.1.2 Jelly Bean through the phone's official connectivity software.
I would have stayed with Android 4.0.3, but I needed the upgrade, as 4.1 Jelly Bean is the earliest version supported by the Smart ID app, without which I wouldn't be able to do online banking on my phone, should the need arise. I don't have the SmartID app yet, but now I have the possibility to eventually find out, if I can run it there.
When my primary phone was a flip-phone with just a 2 Mpix camera, then I dreamed of getting that Nokia Asha 311 one day, as it had all of the new features that I thought I could want.
A young relative got that one for his birthday, but lost it soon after under a tree in the countryside (it was found a year later in a bit disheveled state, but it still worked).
In late 2013, I got the Galaxy Mini II as a hand-me-down (used). It's got a better camera than the flip phone (3.15 Mpix), and comes with Android 2.3 Gingerbread, ended up with a longer useable lifetime and with more functionality and apps than I would have had with Asha 311.
For instance, I could install Firefox on Android, and that extended the Mini II's useable lifetime for quite a bit longer than it would with just the default Android browser.
If equipped with NoScript, and configured properly, then Firefox is the browser that can prevent the planned obsolescence of many old Androids.
When several apps stopped working on Android 2.3, I could use their mobile web equivalents in Firefox. Even Skype for Web, which needed specific work to function in Firefox on Gingerbread.
Five years after I got the Mini II, by Christmas 2018, I finally got an upgrade, which is a hand-me-down from an elder relative, who got a substantial phone upgrade themselves, and had no need for the old phone.
The 'newer' phone has almost the same specs, but a 5 Mpix camera, and had Android 4.0.3 Ice Cream Sandwich (ICS), which I'd upgraded it to Android 4.1.2 Jelly Bean through the phone's official connectivity software.
I would have stayed with Android 4.0.3, but I needed the upgrade, as 4.1 Jelly Bean is the earliest version supported by the Smart ID app, without which I wouldn't be able to do online banking on my phone, should the need arise. I don't have the SmartID app yet, but now I have the possibility to eventually find out, if I can run it there.
Sunday, June 24, 2018
A snippet on using Android 2.3 in 2018.
The text below was written in reply to a comment under one video about using Android 2.3 in 2018.
Pinch-to-zoom can and does work, but several things need to be done beforehand to implement this feature.
If I heard correctly, then the phone in question is a Huawei M865C, aka Ascend II (or Ascend 2). Its 600 MHz CPU is Qualcomm Snapdragon S1, specifically MSM7627, and is based on the ARMv6 architecture.
There is 160 Mb of internal storage available to the user. That's a very small amount, but storage is expandable with a microSD card, and PhoneScoop has it, that a 2 Gb card is included (either in the package, or as installed). I recommend using the incuded 2 Gb card, if it's already been installed and set to act as extended storage for the operating system.
One must update the device's system clock to make sure that some of the certificates are (correctly) rendered invalid, and that others still remain valid. This resolves only some of the certificate issues with the native browser component.
Then, one must let the operating system auto-update Google Play Store and Google Play Services. This happens in the background, and without notifications. These two services have several update cycles each to go through, as one depends on a version of another to update.
The version numbers below are based on what they are in Android 2.3.6.
AFAIK, the most recent Gingerbread version of Google Play Store is version 6.2.0.2, and the latest Google Play Services is v. 10.0.84.
The latest or most modern installable version of Google Play Services may take well over 100 MB of local storage, so a microSD card may be in order for long-term use, if it's not already present. Some Gingerbread devices support formatting a microSD card into an extended system volume, and a bundled card — albeit relatively small at just 2 Gb — may already do just that.
While it would be possible to move the microSD card around to other devices, the phone's operating system will still depend on that card for apps and updates, and in the absence of that card, the operating system might either cease working, or not work as one would expect. If the Android system supports graceful degradation, then only some updates and apps stop working and will appear as unavailable.
Once Google Play Store is accessible, update Google Maps. The most recent version is 6.14.5.
The most recent version of YouTube is 5.5.30. Watching videos and most other activities are possible, except uploading — there, you'll get a 410 error.
If all that doesn't work, install Firefox. Since the example phone, Huawei Ascend II, has a CPU based on the ARMv6 architecture, choose Firefox 31.3esr.
If Firefox is not available at the Play Store, you can download it from the Mozilla archive here. Note, that en-US is for a U.S.-English only package, and multi is for a multilingual package.
Devices with CPUs based on the ARMv7 architecture can have a version of Firefox up to and including v. 47.0.
Firefox has its own certificate store, which is quite a bit more up-to-date.
While these versions are not the latest versions of Firefox, they are still comparably more modern than the default Internet Browser, and so, Firefox will work in Android 2.3.
Note, that while Firefox will work and render modern websites, it's slow to start up as it loads settings and extensions. Since Huawei Ascend II only has 256 Mb of RAM, then Firefox is likely to take up all available RAM memory. You will need an ad-blocker, and you will need NoScript to prevent sites from hogging system resources. Most sites will load nicely and better than the aged default browser.
Use Firefox to login to the the web-based Google Play Store, where one can also download/install the official Google Maps.
I also recommend updating to Android 2.3.6, as it has some improvements, and slightly newer security certificates. The Android version in the video was certainly v2.3.4 or less.
If there is not enough storage to update Google Play Services:
Back up all your photos and videos, then use the built-in file manager.
In file manager settings, set it to show hidden files, and to show file extensions. Go to approximately where the photos are typically saved to:
Go into the .thumbnails folder, select all files, and delete them. This should save plenty of space, but note, that the system may re-create the thumbnail database at any time; especially when you view the gallery. Do not delete the DCIM folder, as it's the default folder where photos are saved to. The Camera app can be configured to save to a microSD card, if one is available.
Note, that if one or more thumbnails contain a small-scale image of a valuable deleted photo, you can connect the phone to the computer as a mass storage device, if the computer has access to relevant drivers. You'll need to download and install the phone's drivers from the manufacturer's website.
To reiterate:
You might need a separate microSD card on that phone, and if your particular phone model supports it, you can format or set the microSD card as an extension of system storage. Keep in mind, that that card is then tied to the phone.
Pinch-to-zoom can and does work, but several things need to be done beforehand to implement this feature.
If I heard correctly, then the phone in question is a Huawei M865C, aka Ascend II (or Ascend 2). Its 600 MHz CPU is Qualcomm Snapdragon S1, specifically MSM7627, and is based on the ARMv6 architecture.
There is 160 Mb of internal storage available to the user. That's a very small amount, but storage is expandable with a microSD card, and PhoneScoop has it, that a 2 Gb card is included (either in the package, or as installed). I recommend using the incuded 2 Gb card, if it's already been installed and set to act as extended storage for the operating system.
One must update the device's system clock to make sure that some of the certificates are (correctly) rendered invalid, and that others still remain valid. This resolves only some of the certificate issues with the native browser component.
Then, one must let the operating system auto-update Google Play Store and Google Play Services. This happens in the background, and without notifications. These two services have several update cycles each to go through, as one depends on a version of another to update.
The version numbers below are based on what they are in Android 2.3.6.
AFAIK, the most recent Gingerbread version of Google Play Store is version 6.2.0.2, and the latest Google Play Services is v. 10.0.84.
The latest or most modern installable version of Google Play Services may take well over 100 MB of local storage, so a microSD card may be in order for long-term use, if it's not already present. Some Gingerbread devices support formatting a microSD card into an extended system volume, and a bundled card — albeit relatively small at just 2 Gb — may already do just that.
While it would be possible to move the microSD card around to other devices, the phone's operating system will still depend on that card for apps and updates, and in the absence of that card, the operating system might either cease working, or not work as one would expect. If the Android system supports graceful degradation, then only some updates and apps stop working and will appear as unavailable.
Once Google Play Store is accessible, update Google Maps. The most recent version is 6.14.5.
The most recent version of YouTube is 5.5.30. Watching videos and most other activities are possible, except uploading — there, you'll get a 410 error.
If all that doesn't work, install Firefox. Since the example phone, Huawei Ascend II, has a CPU based on the ARMv6 architecture, choose Firefox 31.3esr.
If Firefox is not available at the Play Store, you can download it from the Mozilla archive here. Note, that en-US is for a U.S.-English only package, and multi is for a multilingual package.
Devices with CPUs based on the ARMv7 architecture can have a version of Firefox up to and including v. 47.0.
Firefox has its own certificate store, which is quite a bit more up-to-date.
While these versions are not the latest versions of Firefox, they are still comparably more modern than the default Internet Browser, and so, Firefox will work in Android 2.3.
Note, that while Firefox will work and render modern websites, it's slow to start up as it loads settings and extensions. Since Huawei Ascend II only has 256 Mb of RAM, then Firefox is likely to take up all available RAM memory. You will need an ad-blocker, and you will need NoScript to prevent sites from hogging system resources. Most sites will load nicely and better than the aged default browser.
Use Firefox to login to the the web-based Google Play Store, where one can also download/install the official Google Maps.
I also recommend updating to Android 2.3.6, as it has some improvements, and slightly newer security certificates. The Android version in the video was certainly v2.3.4 or less.
If there is not enough storage to update Google Play Services:
Back up all your photos and videos, then use the built-in file manager.
In file manager settings, set it to show hidden files, and to show file extensions. Go to approximately where the photos are typically saved to:
/sdcard/DCIM/.thumbnails . Files and folders with a leading dot are hidden.Go into the .thumbnails folder, select all files, and delete them. This should save plenty of space, but note, that the system may re-create the thumbnail database at any time; especially when you view the gallery. Do not delete the DCIM folder, as it's the default folder where photos are saved to. The Camera app can be configured to save to a microSD card, if one is available.
Note, that if one or more thumbnails contain a small-scale image of a valuable deleted photo, you can connect the phone to the computer as a mass storage device, if the computer has access to relevant drivers. You'll need to download and install the phone's drivers from the manufacturer's website.
To reiterate:
You might need a separate microSD card on that phone, and if your particular phone model supports it, you can format or set the microSD card as an extension of system storage. Keep in mind, that that card is then tied to the phone.
Wednesday, July 5, 2017
How to get Skype on the Web to work in Firefox in old Android
As you may already know, Microsoft ceased Skype app support below Android 4.0.3. This covers Android 3.0 and Android 2.3 Gingerbread.
Maybe some of you probably cannot upgrade from these OS versions to Android 4.0.4 or greater, or that you can't upgrade your device. So, I've got a possible solution, but it's very technical, and might not work with every affected device.
If you feel adventurous, then bear with me.
The solution only works on certain devices that have a screen big enough, and a CPU and memory combo that's big enough, too.
* The screen resolution must be greater than 320x480 px, because Skype on the Web was not designed for small screens.
Your mileage may vary.
* Firefox version between 44.0–47.0. Firefox 44.0 is the earliest version that can handle Skype; possibly, because of its more generous cookie acceptance mechanism from that version on. (Firefox 44.0 and newer no longer have the cookie prompting mechanism.) On some versions of Android Gingerbread, only Firefox 44.0–45.0 are the newest to run, though version 47.0 of the browser is the latest built for Android 2.3. If v47.0 won't run, get v44.0 or 45.0. Firefox 44.0 supports old-style native Android menus, v45.0 has a newer main menu.
* Another requirement is installation of the NoScript Anywhere extension in Firefox. Technical users already know about this extension. If configured correctly, then NoScript allows reducing overall resource usage while browsing the modern web.
The hardest part is allowing/disallowing sites in NoScript on a subdomain level, because it requires Vim Touch for advanced text editing. (Someone please write an extension to alleviate this issue.)
Since Firefox versions 47.0 and below for Android 2.3 are older than the version required by the web Skype, you need to modify the user agent string to make Firefox appear like a newer version to allow Skype on the Web to load.
In about:config, create a new setting string by tapping the Plus (+) button; then specify, that the setting is a string, then add the name to the setting:
For a time, you can leave the string part empty, until you paste the one I suggest here:
The UA string needs to show that the browser is a desktop browser and of a reasonably recent version. The one I use on my device is this:
Sample screenshot of how it looks in about:config —
You must continue adding UA strings for a number of Skype and Microsoft domains as described above, so here's what I think is the full list of those:
Generally, you can whitelist all of the above domains, and be happy.
But if you want to tinker on a subdomain level, then you must edit the line in about:config at
To edit that line, I strongly recommend using VIM Touch, which is available from the F-Droid repository of FOSS apps for Android. For detailed instructions on how to do this, read A primer on whitelisting subdomains in Firefox NoScript. This is compulsory.
I compiled the whitelist with the help of NoScript for desktop Firefox, which lists the below domains for all to see.
then you must edit the JSON string in VIM Touch. So here's what I got what I think is the full list of subdomains to whitelist:
This list is in JSON format: domains are surrounded by double quotes, with
I typically also add the https:// protocol prefix to make sure, that only the secure version of the site is whitelisted. This is useful in case a non-secure version of a domain is compromised, but a secure version isn't, as domains with http:// and https:// can serve different content.
Domains in double quotes are those that use variable subdomains, which makes using the protocol prefix moot. Double-quoted domains support both http:// and https:// versions of a site. Sometimes, these are also made to serve non-secure content. The profuse use of the secure protocol prefix is really for security purposes.
Whitelisting only these domains means, that other Microsoft properties are still not script-enabled.
The entire exercise worked for me, but the Skype for Web UI was extremely slow on my device. There are newer, more powerful and better devices with only Android 2.3–4.0.3, so people with those might have more luck.
Entering YouTube URLs or web addresses starting with either http:// or https:// might not work. If that is so, enter web addresses without these protocol prefixes.
A more experienced user might choose to edit the ABE string from about:config in a text editor. It goes like this: copy string, paste to text editor, edit, copy string, paste string to overwrite the olde parameter value. Editing the NoScript ABE string in Firefox mobile does have a learning curve.
There was also the case of having to manually set web.skype.com to accept cookies though "Page Info" > Permissions > Cookies in Firefox (set to Allow from all gray/default). Strange.
Maybe some of you probably cannot upgrade from these OS versions to Android 4.0.4 or greater, or that you can't upgrade your device. So, I've got a possible solution, but it's very technical, and might not work with every affected device.
If you feel adventurous, then bear with me.
The solution only works on certain devices that have a screen big enough, and a CPU and memory combo that's big enough, too.
What you need
* A reasonably fast device. Slow devices are those with a CPU with 800 MHz or less, and 512 Mb RAM or less. This was my experience, and slow means very slow. In my case, I got Skype on the Web to work, but as it loads in Firefox, the browser takes the entire resources of a device, forces other apps to quit (per Android design), and the entire interface takes three-to-four minutes to load from login to UI.* The screen resolution must be greater than 320x480 px, because Skype on the Web was not designed for small screens.
Your mileage may vary.
* Firefox version between 44.0–47.0. Firefox 44.0 is the earliest version that can handle Skype; possibly, because of its more generous cookie acceptance mechanism from that version on. (Firefox 44.0 and newer no longer have the cookie prompting mechanism.) On some versions of Android Gingerbread, only Firefox 44.0–45.0 are the newest to run, though version 47.0 of the browser is the latest built for Android 2.3. If v47.0 won't run, get v44.0 or 45.0. Firefox 44.0 supports old-style native Android menus, v45.0 has a newer main menu.
* Another requirement is installation of the NoScript Anywhere extension in Firefox. Technical users already know about this extension. If configured correctly, then NoScript allows reducing overall resource usage while browsing the modern web.
The hardest part is allowing/disallowing sites in NoScript on a subdomain level, because it requires Vim Touch for advanced text editing. (Someone please write an extension to alleviate this issue.)
The soup
Firefox for Android comes with this neat feature, that one can specify site-specific user agent overrides in about:config.The user agent is a piece of text that a browser sends to a website as identifying information about itself. It contains operating system name and version, and browser name and version. All browsers do that since the first browsers on the web.
about:config is the advanced settings page in Firefox, GNU IceCat, and other browsers that use the Gecko rendering engine. You can access the page by typingabout:configin the address bar.
Since Firefox versions 47.0 and below for Android 2.3 are older than the version required by the web Skype, you need to modify the user agent string to make Firefox appear like a newer version to allow Skype on the Web to load.
In about:config, create a new setting string by tapping the Plus (+) button; then specify, that the setting is a string, then add the name to the setting:
general.useragent.override.skype.comFor a time, you can leave the string part empty, until you paste the one I suggest here:
The UA string needs to show that the browser is a desktop browser and of a reasonably recent version. The one I use on my device is this:
Mozilla/5.0 (X11; Linux armv7l; rv:52.0) Gecko/52.0 Firefox/52.0Some of the items mean the following:
*X11is the platform part, and means X Window System, the most widespread graphical environment in UNIX/Linux.
*Linuxis the OS and the OS kernel name. Because Android uses the Linux kernel, stay with X11 and Linux (though Android uses a different graphical subsystem).
*armv7l— the CPU architecture in my device. Most mobile devices running Android 2.3 and 4.0 have that, and it's the one variable that you can change. The letter after number 7 is not 1 (one), but a lower-case L.
If your device is based on ARMv6, then it's more rare and physically less fast, and the most recent supported Firefox for that is version 31.3.0esr (also for Android 2.2 Froyo). You can use ARMv6 in the string, if you know the correct nomenclature naming of the architecture (I haven't looked it up), and it's actually in your device.
*rv:stands for revision;
*Geckois the name of the browser's rendering engine;
*Firefoxis the browser name. Note, that Skype on the Web does not officially support alternative Gecko-based browsers, such as IceCat, so use only Firefox in the UA string. This means, that you can use GNU IceCat, but you'd still need to enter the Firefox-based UA string.
*Firefox/52.0is the current official extended support release (ESR). As above, the version number must be 52.0 everywhere.
Sample screenshot of how it looks in about:config —
Domains to add for useragent override
You must continue adding UA strings for a number of Skype and Microsoft domains as described above, so here's what I think is the full list of those:
skype.com
skypeassets.com
live.com
microsoft.com
s-microsoft.com
msecnd.net
gfx.com
gfx.ms
trouter.io
bing.com
azureedge.net
Domains to whitelist in NoScript
Generally, you can whitelist all of the above domains, and be happy.
But if you want to tinker on a subdomain level, then you must edit the line in about:config at
extensions.nsa.policyTo edit that line, I strongly recommend using VIM Touch, which is available from the F-Droid repository of FOSS apps for Android. For detailed instructions on how to do this, read A primer on whitelisting subdomains in Firefox NoScript. This is compulsory.
I compiled the whitelist with the help of NoScript for desktop Firefox, which lists the below domains for all to see.
then you must edit the JSON string in VIM Touch. So here's what I got what I think is the full list of subdomains to whitelist:
"config.skype.com":1,
"drip.trouter.io":1,
"lw.skype.com":1,
"secure.skypeassets.com":1,
"https://account.azureedge.net":1,
"https://api.asm.skype.com":1,
"https://api.skype.com":1,
"https://apps.skypeassets.com":1,
"https://auth.gfx.com":1,
"https://auth.gfx.ms":1,
"https://browser.pipe.aria.microsoft.com":1,
"https://c1.microsoft.com":1,
"https://client-s.gateway.messenger.live.com":1,
"https://config.skype.com":1,
"https://consumer.entitlement.skype.com":1,
"https://contacts.skype.com":1,
"https://cs.microsoft.com":1,
"https://drip.trouter.io":1,
"https://flagsapi.skype.com":1,
"https://go.trouter.io":1,
"https://apps.skypeassets.com":1,
"https://avatar.skype.com":1,
"https://c.bing.com":1,
"https://i.s-microsoft.com":1,
"https://kes.skype.com":1,
"https://login.live.com":1,
"https://prod.registrar.skype.com":1,
"https://prod.tpc.skype.com":1,
"https://s4w.cdn.skype.com":1,
"https://static-asm.secure.skypeassets.com":1,
"https://static.asm.skype.com":1,
"https://support.skype.com":1,
"https://swx.cdn.skype.com":1,
"https://web.skype.com":1,
"https://weu1-api.asm.skype.com":1,
"https://www.skype.com":1
This list is in JSON format: domains are surrounded by double quotes, with
:1 meaning to allow that domain (:0 is to forbid, but you won't need that with these).I typically also add the https:// protocol prefix to make sure, that only the secure version of the site is whitelisted. This is useful in case a non-secure version of a domain is compromised, but a secure version isn't, as domains with http:// and https:// can serve different content.
Domains in double quotes are those that use variable subdomains, which makes using the protocol prefix moot. Double-quoted domains support both http:// and https:// versions of a site. Sometimes, these are also made to serve non-secure content. The profuse use of the secure protocol prefix is really for security purposes.
Whitelisting only these domains means, that other Microsoft properties are still not script-enabled.
The entire exercise worked for me, but the Skype for Web UI was extremely slow on my device. There are newer, more powerful and better devices with only Android 2.3–4.0.3, so people with those might have more luck.
Errata and considerations
In my experience with a very low-end Android device, Video and audio won't work. Text and SMSes work, and sometimes that's everything that is needed.Entering YouTube URLs or web addresses starting with either http:// or https:// might not work. If that is so, enter web addresses without these protocol prefixes.
A more experienced user might choose to edit the ABE string from about:config in a text editor. It goes like this: copy string, paste to text editor, edit, copy string, paste string to overwrite the olde parameter value. Editing the NoScript ABE string in Firefox mobile does have a learning curve.
February 2018 update:
I recently upgraded Malawarebytes AntiMalware, and it had "web protection" for two weeks. After that, I could not have access to Skype on both the Skype desktop app, and Skype for the web. After uninstalling, I could connect again via the browser, but the service forced me to make my Skype account a Microsoft account; possibly because of multiple unsuccessful logins.There was also the case of having to manually set web.skype.com to accept cookies though "Page Info" > Permissions > Cookies in Firefox (set to Allow from all gray/default). Strange.
A primer on whitelisting subdomains in Firefox NoScript
In Firefox or GNU IceCat, go to about:config, look for the
settings string. Search for
This configuration line is only one line in JSON format, so it must be edited in VIM Touch.
Vim Touch (stylised as VIMTouch) is a port of VIM to Android, available from the F-Droid repository of FOSS apps for Android. You do need experience with vi/VIM.
First copy the line by long-pressing the setting in about:config and selecting 'copy value'. Paste it into VIM with <
(Hereonafter to avoid ambiguity: In places, where other punctuation is also used, I use < > with Vim commands that must be typed with the virtual keyboard. These are not to be typed.)
Save the line for backup:
Always be careful with JSON syntax for that line, because a typo might bork it. That's why it's useful to save the original (working) line first as backup.
Then, in order to separate the domains part of the JSON line, break the line where the domains begin, and add a linebreak to separate the right wavy bracket
Then copy the domains line into a new window: <
Then create a new window with <
Then break this one long line to separate all the domains each into their own line:
Screenshot:
NoScript Anywhere does not have many domains built in, but there are some added by its developer. The domains, each now in their own line, are formatted like this:
"https://web.skype.com":1,
"https://www.skype.com":1
The very last domain must never have a comma at the end. Upon pasting it into the original file, the wavy right bracket } goes there.
You add subdomains that you like into each new line:
"www.website.com":1,
"ads.website.com":0,
Generally, you only need to whitelist the www part, and all the other subdomains (such as ads.website.com) are not accepted for running scripts.
That's the entire soup of subdomain-based whitelisting, in that one can whitelist only the subdomains needed for scripting. Suppose m.website.com is script-heavy, but you want to visit www.website.com with scripts allowed, and m.website.com with scripts specifically disallowed:
"www.website.com":1,
"m.website.com":0,
As you add more and more domains, you need to sort the list, too. In Vim, use the
command. This sorts all the domains alphabetically.
Suppose you have the right expanded collection of subdomains you want to accept:
Note again, that the last line must be without a comma at the end.
To join the domains into one line, select all text with
Select all text again with <
Select the entire domains line with <
Save the expanded line into a new file:
I usually add the date, and in one word also what I added:
Copy the expanded settings line to use outside Vim (to be pasted into Firefox) by selecting it with <
Go to Firefox (or IceCat's) about:config page. It should still be open. If it's not, it may reload on its own.
Locate the
* Tap on the setting to select it.
* Tap into the setting value to focus the text cursor in it.
* Tap into the line again, to get Firefox text editing tools:
* tap the select all (window-like) button to select the entire line,
* tap the paste button to paste the copied line,
* press Enter on the virtual keyboard.
* Go to about:blank in the address bar.
That should do it, and the added configuration line takes effect right away. Go to a website to test it, and the NoScript menu item should reflect the results.
Note, that Firefox/IceCat have a tendency to reload the about:config page from time-to-time, so it's more useful to copy and paste settings names and values instead of separately typing them, as occasional about:config page reloads break the new setting creation.
extensions.nsa.policysettings string. Search for
nsa.po to get the correct match.This configuration line is only one line in JSON format, so it must be edited in VIM Touch.
Vim Touch (stylised as VIMTouch) is a port of VIM to Android, available from the F-Droid repository of FOSS apps for Android. You do need experience with vi/VIM.
First copy the line by long-pressing the setting in about:config and selecting 'copy value'. Paste it into VIM with <
"*P>.(Hereonafter to avoid ambiguity: In places, where other punctuation is also used, I use < > with Vim commands that must be typed with the virtual keyboard. These are not to be typed.)
Save the line for backup:
:w /sdcard/yourfolder/NoScript_Firefox_whitelist_backup.txtAlways be careful with JSON syntax for that line, because a typo might bork it. That's why it's useful to save the original (working) line first as backup.
Then, in order to separate the domains part of the JSON line, break the line where the domains begin, and add a linebreak to separate the right wavy bracket
} at the end of that line into a new line.Then copy the domains line into a new window: <
Shift+V> to select the entire line in visual mode, then press <y> to copy (y = yank). To copy outside Vim, use <"*y>.Then create a new window with <
:sp new> in the Vim command line. Tap into the newly-created window, and paste the copied text with <p> or <P>. I usually use the lower-case p (paste) command to save time.Then break this one long line to separate all the domains each into their own line:
:s/\&,/&^M/g:s — substitute. This is the find and replace command in Vi/Vim. The basics on how it works here.\&, — search for commas&^M — Add a newline. The ampersand & is for adding text, then press Ctrl+V and Enter/Return on the virtual keyboard to get ^M. Use Hacker's Keyboard, because it has the function keys of normal keyboard, such as Ctrl and Alt. Hacker's Keyboard is also available on F-Droid.g — search through the entire current lineScreenshot:
NoScript Anywhere does not have many domains built in, but there are some added by its developer. The domains, each now in their own line, are formatted like this:
"https://web.skype.com":1,
"https://www.skype.com":1
The very last domain must never have a comma at the end. Upon pasting it into the original file, the wavy right bracket } goes there.
You add subdomains that you like into each new line:
"www.website.com":1,
"ads.website.com":0,
1 is to allow, 0 to forbid. This means, that the website you add has its www part working, but not its ads subdomain.Generally, you only need to whitelist the www part, and all the other subdomains (such as ads.website.com) are not accepted for running scripts.
That's the entire soup of subdomain-based whitelisting, in that one can whitelist only the subdomains needed for scripting. Suppose m.website.com is script-heavy, but you want to visit www.website.com with scripts allowed, and m.website.com with scripts specifically disallowed:
"www.website.com":1,
"m.website.com":0,
As you add more and more domains, you need to sort the list, too. In Vim, use the
:sortcommand. This sorts all the domains alphabetically.
Suppose you have the right expanded collection of subdomains you want to accept:
"ads.website.com":0,
"https://web.skype.com":1,
"https://www.skype.com":1,
"www.website.com":1
Note again, that the last line must be without a comma at the end.
To join the domains into one line, select all text with
ggVG and key in gJ to join all text. Note, that case is important.ggVG — gg goes to document start, V selects the entire (first) line, G goes to the very last line, and thus expands the selection to there in conjunction with V.Select all text again with <
ggVG>, then copy it with <y>. Tap into the original Vim window with the pasted JSON settings line. Make sure the text cursor is in the domains list.Select the entire domains line with <
V>, and paste over it with <p>. Join all three lines with <gJ>.Save the expanded line into a new file:
:w /sdcard/yourfolder/NoScript_new_whitelist_for_Firefox.txtI usually add the date, and in one word also what I added:
:w /sdcard/yourfolder/20170705_NoScript_whitelist_for_Firefox_(Skype).txtCopy the expanded settings line to use outside Vim (to be pasted into Firefox) by selecting it with <
V>, and use <"*y> to copy it into the external buffer.Go to Firefox (or IceCat's) about:config page. It should still be open. If it's not, it may reload on its own.
Locate the
extensions.nsa.policy setting by using nsa.po to search.* Tap on the setting to select it.
* Tap into the setting value to focus the text cursor in it.
* Tap into the line again, to get Firefox text editing tools:
* tap the select all (window-like) button to select the entire line,
* tap the paste button to paste the copied line,
* press Enter on the virtual keyboard.
* Go to about:blank in the address bar.
That should do it, and the added configuration line takes effect right away. Go to a website to test it, and the NoScript menu item should reflect the results.
Note, that Firefox/IceCat have a tendency to reload the about:config page from time-to-time, so it's more useful to copy and paste settings names and values instead of separately typing them, as occasional about:config page reloads break the new setting creation.
Sunday, January 22, 2017
Uploading files via Firefox in Android 2.3
This is very much a quick-and-dirty post, so that I wouldn't forget about it. As my phone is also currently charging while off, I can't check out some information pertaining to this post. Some time after the phone will have charged, I'll update this post accordingly.
So, yesterday, I had this need to upload a file to a project in Github via Firefox in Android 2.3 Gingerbread.
Now, Github is quite a modern website, and in Android 2.3, the logical browser for visiting Github and other state-of-the-art sites is Firefox for Android or a derivative, such as GNU IceCat, Orfox, or Adblock Browser.
I have two browsers in my phone: GNU IceCat 38.8 and Firefox 44.0. Both have NoScript installed, and Github servers were whitelisted in both. Separate issues with uploading are covered at the end of this post.
The crux of the problem is having a filepicker that works.
Typically, an Android user gets a file activity dialog to pick an app through which to select a file; such as Gallery for photos and videos, or somesuch.
For a simple text file, things are a bit more complicated, but I've discovered two kinds of filepickers that I associated with after having installed two separate apps.
• One filepicker, "Choose file" with blue folder icons, seems to be related to VimTouch, a version of Vim for Android, because I noticed that filepicker after installing this great text editor.
• Another filepicker, "Find file" or "Find command" (I might err with its title) is adorned with the Terminal Emulator icon.
Both VimTouch (alternatively spelled 'Vim Touch') and Terminal Emulator were installed through F-Droid, a repository of free and open source apps for Android.
The filepicker that works, is the one I associate with Terminal Emulator.
Unfortunately, I don't know beyond my memory of my app installation activities, and beyond one app icon about how to find out which app or handler these two particular filepickers are actually associated with.
Upload issues.
Resolved on 28.04.2017.
With IceCat, there were issues relating to uploading files to GitHub, whereby file upload failed with an error. File upload to GitHub worked with Firefox for Android, but for some odd reason, did not work in IceCat.
Now, I use NoScript in Android Firefox and in IceCatMobile (based on Firefox with very small changes). Since both have slightly different NoScript whitelists, then I attributed the issue to an incomplete NoScript whitelist in IceCatMobile. But it was not at fault, and the problem was much simpler, though no less esoteric.
Turns out, that all other things being almost equal, GitHub does not recognise the Firefox-based GNU IceCat browser when uploading files, if an IceCat-only desktop user-agent (UA) string is used.
The solution is to change in IceCat's
The rationale for subdomain-level whitelisting is, that my phone is rather underpowered, and subdomain-level whitelists in Firefox/derivatives make it possible to allow advanced site functionality, and at the same time, to block script-based ads and trackers. In addition, it's possible to switch off very resource-intensive site functionality by blocking certain subdomains of a website. Such features are impossible in the stock Android browser, the rendering engine of which dates back to 2011.
(I'm often contemplate writing a separate post about all that.)
So, the NoScript whitelist for IceCat is typically more fine-grained; yet oddly, file upload to Github actually worked with Firefox.
So, yesterday, I had this need to upload a file to a project in Github via Firefox in Android 2.3 Gingerbread.
Now, Github is quite a modern website, and in Android 2.3, the logical browser for visiting Github and other state-of-the-art sites is Firefox for Android or a derivative, such as GNU IceCat, Orfox, or Adblock Browser.
I have two browsers in my phone: GNU IceCat 38.8 and Firefox 44.0. Both have NoScript installed, and Github servers were whitelisted in both. Separate issues with uploading are covered at the end of this post.
The crux of the problem is having a filepicker that works.
Typically, an Android user gets a file activity dialog to pick an app through which to select a file; such as Gallery for photos and videos, or somesuch.
For a simple text file, things are a bit more complicated, but I've discovered two kinds of filepickers that I associated with after having installed two separate apps.
• One filepicker, "Choose file" with blue folder icons, seems to be related to VimTouch, a version of Vim for Android, because I noticed that filepicker after installing this great text editor.
• Another filepicker, "Find file" or "Find command" (I might err with its title) is adorned with the Terminal Emulator icon.
Both VimTouch (alternatively spelled 'Vim Touch') and Terminal Emulator were installed through F-Droid, a repository of free and open source apps for Android.
The filepicker that works, is the one I associate with Terminal Emulator.
Unfortunately, I don't know beyond my memory of my app installation activities, and beyond one app icon about how to find out which app or handler these two particular filepickers are actually associated with.
Upload issues.
Resolved on 28.04.2017.With IceCat, there were issues relating to uploading files to GitHub, whereby file upload failed with an error. File upload to GitHub worked with Firefox for Android, but for some odd reason, did not work in IceCat.
Now, I use NoScript in Android Firefox and in IceCatMobile (based on Firefox with very small changes). Since both have slightly different NoScript whitelists, then I attributed the issue to an incomplete NoScript whitelist in IceCatMobile. But it was not at fault, and the problem was much simpler, though no less esoteric.
Turns out, that all other things being almost equal, GitHub does not recognise the Firefox-based GNU IceCat browser when uploading files, if an IceCat-only desktop user-agent (UA) string is used.
The solution is to change in IceCat's
about:config page the Gecko-based user-agent override affecting the Github domain to that of Firefox, leaving the version number intact.<Moot:> Possible issues wrt NoScript
The reason for that, is, that I edit NoScript whitelists in Vim Touch so as to get a very fine-grained whitelist on a subdomain level (3rd-level domains and below, such assub.domain.tld ), because the browser extension in Android does not provide such functionality.The rationale for subdomain-level whitelisting is, that my phone is rather underpowered, and subdomain-level whitelists in Firefox/derivatives make it possible to allow advanced site functionality, and at the same time, to block script-based ads and trackers. In addition, it's possible to switch off very resource-intensive site functionality by blocking certain subdomains of a website. Such features are impossible in the stock Android browser, the rendering engine of which dates back to 2011.
(I'm often contemplate writing a separate post about all that.)
So, the NoScript whitelist for IceCat is typically more fine-grained; yet oddly, file upload to Github actually worked with Firefox.
Saturday, November 5, 2016
Postimees ja vana Android
See on (algselt kiirena kirjutatud) täiendus varasemale postitusele, mis kritiseeris Postimees Online (edaspidi PMO) uue mobiiliversiooni kasutatavust, kus peamiseid kriitikanooli sai sisu liigtihe automaatne uuestilaadimine.
Ehkki seesinase fookus on Postimehe koduleht, võimaldavad allpool pakutud lahendused laiemalt külastada teisigi kaasaegseid Interneti-lehekülgi, mis Androidi (2.3 ja vanemate) vaikimisi lehitsejas ei näita või pole enam toetatud.
Juhised nõuavad mõnetist tehnika-alast oskust, kuid leian, et instruktsioonides ei tohiks midagi väga keerulist olla.
Probleemid:
* Android 2.3 on vana ja Postimehe enda äpp võib-olla näitab, võib-olla mitte, aga tegemist on äpiümbrisega (wrapperiga), mis põhimõtteliselt näitab Postimehe kodulehte sisseehitatud vaikimisi veebimootoriga. Postimehe äppi pole tegelikult vaja.
* Android 2.3-s vaikimisi lehitseja on liiga vana, et kogu seda sisu adekvaatselt näidata, sest selle lehitseja umbes viis aastat vana veebimootor on lootusetult aegunud.
Mida teha:
* Tõmmata peale Firefox Androidile.
** PMO lehtede jaoks tuleb Firefoxi töölaua-vaadet valida menüüst iga kord peale Firefoxi käivitamist või peale lehitsejas uue vahekaardi avamist.
** Teiseks on PMO töölaua-versiooni küljendus mõeldud töölauale, aga kunagi töötas see väga ilusti mobiiliversioonina. Vaadet on võimalik näppudega suurendada. Need liigutused on tüütud ja ajakulukad.
Lahendused:
1. Oletades, et sinu Firefoxi versioon on 47.0 (nagu üleval kirjas, Android 2.3-le kõige hiljutisem), jäta allolev vahele ja mine edasi järgmisele punktile.
1.1 puutuda seal suurt pluss-märki ja kirjutada nimelahtrisse
1.2 Puutuda nuppu "tõeväärtus", vali "string"
1.3 "Sisesta string" lahtris lisa järgmine user-agent string (lehitseja versioon, mille lehitseja saadab seatud leheküljele, antud juhul postimees.ee) —
Kui telefonis on Android 2.2, või kui telefonis ka on Android 2.3, aga protsessoriarhitektuur ARMv6, siis nende jaoks on uusim Firefox hoopis versioon 31.3.0esr. Siis peaks kasutajastring olema selline:
1.4 Olles sobiva kasutajastringi sisestanud, vajuta nupule "Loo".
Et vähemalt enda jaoks probleemi kiiresti lahendada, tegin järgmist:
Installisin Firefoxile laienduse nimega Stylish. Sellega on võimalik muuta lehitsejas näidatavate lehekülgede välimust läbi mobiiliseadmesse tõmmatud kasutajastiilide (i.k. userstyles).
Et kõik teisedki inimesed saaksid seda stiililehte kasutada, panin kasutajastiili üles GitHubi:
https://github.com/juneyourtech/GM_PM/raw/master/PM_mobile_classic.css
1. Kopeerida ülalolev aadress.
2. Firefoxis minna läbi Lisade lehekülje Stylish alamlehele: Menüü [> Veel >] Lisad > Stylish;
3. Vajuta "Halda stiile" nupule;
4. Vajuta nupule "Install from URLs", aseta tekstiväljale ülalolev kopeeritud aadress. Vajuta Sobib/OK, kirjuta lisaks stiili nimi.
5. Postimehe töölaua-versioon peaks sestpeale olema nähtav mobiilidele sobilikul kujul.
6. Edaspidi tuleks eelistada Postimehe www-aadressi kujul www.postimees.ee
Ei garanteeri, et see kasutajastiil töötab kõigi peamiste Postimehe alamlehtedega (eriti Ilmajaam).
Reklaame see kasutajastiil otseselt ei blokeeri, kuid üldiselt olen lähtunud sellest, et Firefoxile Androidil on peale installitud skripte blokeeriv NoScript Anywhere laiendus, milles on antud postituse teemat silmas pidades lubatud peamiselt postimees.ee ja pmo.ee domeenid.
Veidi ajaloost:
Valmistehtud stiililehe esialgne tulemus oli rahuldav, kuid alguses ei olnud mul veel õiget lahendust, mille abil olnuks võimalik PMO töölauaversiooni probleemivabalt kätte saada, isegi kui teatud olukordades paistis disain töötavat.
Hiliskevadel või suvel tõmbasin eksperimenteerimise käigus peale Firefoxil põhineva GNU IceCat lehitseja, millel pooljuhuslikult avastasin kasutajastringi muutmise võimaluse, ning ka selle, et erinevat kasutajastringi on võimalik seadistada erinevatele saitidele.
Sügisel avastasin lõpuks, et ka Firefox toetab sama funktsionaalsust; lihtsalt on see about:config lehel iseenesest mitteeksisteeriv ja user-agent string tuleb ise lisada.
Üldse, kui sinu hallata on suure levikuga veebileht, siis üks suuremaid vigu on [kogu] lehekülje sisu automaatne uuestilaadimine, sest kasutaja pole seda ise soovinud, ning mobiiliseadmetes kulutab see akut.Antud blogipostitus on mõeldud kõigile neile inimestele, kelle mobiiliseade (telefon või tahvelarvuti) on varustatud Android 2.3 "Gingerbread" opsüsteemiga, mida pole võimalik uuendada, ning mille vaikimisi lehitseja on liiga vana ja aegunud, et oleks võimalik Postimehe veebilehelt mugavalt uudiseid lugeda. Või üldse.
Ehkki seesinase fookus on Postimehe koduleht, võimaldavad allpool pakutud lahendused laiemalt külastada teisigi kaasaegseid Interneti-lehekülgi, mis Androidi (2.3 ja vanemate) vaikimisi lehitsejas ei näita või pole enam toetatud.
Juhised nõuavad mõnetist tehnika-alast oskust, kuid leian, et instruktsioonides ei tohiks midagi väga keerulist olla.
Probleemid:
* Android 2.3 on vana ja Postimehe enda äpp võib-olla näitab, võib-olla mitte, aga tegemist on äpiümbrisega (wrapperiga), mis põhimõtteliselt näitab Postimehe kodulehte sisseehitatud vaikimisi veebimootoriga. Postimehe äppi pole tegelikult vaja.
* Android 2.3-s vaikimisi lehitseja on liiga vana, et kogu seda sisu adekvaatselt näidata, sest selle lehitseja umbes viis aastat vana veebimootor on lootusetult aegunud.
Mida teha:
* Tõmmata peale Firefox Androidile.
ARMv7l protsessoriarhitektuuril käiatava Android 2.3 jaoks on kõige uuem Firefoxi versioon 47.0; selle eestikeelse variandi saab tõmmata Mozilla FTP lehelt või Google Play Poest.Mozilla enam ei arenda Android 2.3 jaoks Firefox-i, nii et Google Play Poes võib Firefox olla vabalt märgitud kui ühildumatu. Siis tuleb tõmmata Firefoxi APK-installer eraldi Mozilla FTP-lehelt ja enne selle installimist lubada ajutiseks Androidi seadetes kolmandatest allikatest installimise võimalus ehk mitte-Marketist/Play Poest.Asja parem külg on see, et vanale mobiili-opsüsteemile siiski on saadaval modernne lehitseja, millega saab vaadata kaasaegseid veebilehti.* Et PMO mobiiliversiooni sisu laeb liiga tihti, tuleb kasutada PMO töölaua-versiooni. Viimases töötab siis ka artiklite kommentaaride hindamise funktsioon. Ehkki Firefoxi äpi-menüüst on võimalik valida "Töölaua-versioon", tekib ikkagi kaks probleemi:
** PMO lehtede jaoks tuleb Firefoxi töölaua-vaadet valida menüüst iga kord peale Firefoxi käivitamist või peale lehitsejas uue vahekaardi avamist.
** Teiseks on PMO töölaua-versiooni küljendus mõeldud töölauale, aga kunagi töötas see väga ilusti mobiiliversioonina. Vaadet on võimalik näppudega suurendada. Need liigutused on tüütud ja ajakulukad.
Lahendused:
1. Oletades, et sinu Firefoxi versioon on 47.0 (nagu üleval kirjas, Android 2.3-le kõige hiljutisem), jäta allolev vahele ja mine edasi järgmisele punktile.
Kui sa oma Firefoxi versiooni ei tea, otsi see üles: Lähed Firefoxis2. Edasi tuleb minna aadressiriba kaudu leheleabout:lehele, kus see kribukirjas näha on. Jäta see versioon meelde; tähtis on see kujul47.0(täisarv-punkt-null).Ise kasutan Firefoxil põhinevat IseCat lehitsejat; Android 2.3-le on IceCat-i uusim versioon 38.8.0.
about:config — seal on kõik Firefoxi tähtsamad seaded, mis on käsitsi seatavad;1.1 puutuda seal suurt pluss-märki ja kirjutada nimelahtrisse
general.useragent.override.postimees.ee1.2 Puutuda nuppu "tõeväärtus", vali "string"
1.3 "Sisesta string" lahtris lisa järgmine user-agent string (lehitseja versioon, mille lehitseja saadab seatud leheküljele, antud juhul postimees.ee) —
Mozilla/5.0 (X11; Linux armv7l; rv:47.0) Gecko/47.0 Firefox 47.0Kui telefonis on Android 2.2, või kui telefonis ka on Android 2.3, aga protsessoriarhitektuur ARMv6, siis nende jaoks on uusim Firefox hoopis versioon 31.3.0esr. Siis peaks kasutajastring olema selline:
Mozilla/5.0 (X11; Linux armv6; rv:31.0) Gecko/31.0 Firefox 31.01.4 Olles sobiva kasutajastringi sisestanud, vajuta nupule "Loo".
Antud string kehtib ainult Firefox 47.0 kohta. Kui sinu Firefoxi versioon on erinev, peaksid lisama selle, mis sul on.3. Aga see pole veel kõik, sest Postimehe töölaua-versioon mobiilis ju päris korralikult ei näita, sest pisikesel ekraanil on töölauaversioon liiga lai, tekst liiga väike, ning tuleks liiga palju suurendada.
Kogu see tegevus seab postimees.ee domeenile töölaua-põhise lehitsejastringi (i.k. user-agent string) nii, et Postimehe koduleht saadab Firefoxi-mobiililehitsejale töölaua-versiooni.
Ülal väljatoodud kasutajastringis tähendab näiteksX11Unix-põhiste opsüsteemide graafilist keskkonda,Linuxtähistab opsüsteemi nime (sh samanimelist kernelit, mis on Androidis sees),armv7lmobiiliseadme keskprotsessori tüüpi,rv:jaGeckotähistavad Gecko veebimootori (mida kasutavad Firefox, IceCat jt lehitsejad) versiooni, selle järel lehitseja enda nimi (siin vastavalt Firefox) ja versioon.
Et vähemalt enda jaoks probleemi kiiresti lahendada, tegin järgmist:
Installisin Firefoxile laienduse nimega Stylish. Sellega on võimalik muuta lehitsejas näidatavate lehekülgede välimust läbi mobiiliseadmesse tõmmatud kasutajastiilide (i.k. userstyles).
Stylish laiendus töötab nii, et lehitseja tõmbab mõne lehekülje kasutaja seadmesse ja seejärel rakendab Stylish leheküljele seatud kasutajastiilis oleva küljenduse. Lehekülje originaalvälimus jääb lähtekohas ikka samaks, st. kogu see välimuse muutmise protsess toimub ainult kasutaja seadmes, kui kasutaja on mõnele lehekülje mugavama kasutamise tarvis tõmmanud kasutajastiili.Edasi veetsin selle aasta kevadel mitu ööd ja päeva uurides töölaua-Firefoxi arendajatööriistade abil Postimehe lähtekoodi ja kirjutasin oma stiililehe, et nö tagasi saada mobiilide jaoks mõeldud klassikaline välimus.
Et kõik teisedki inimesed saaksid seda stiililehte kasutada, panin kasutajastiili üles GitHubi:
https://github.com/juneyourtech/GM_PM/raw/master/PM_mobile_classic.css
1. Kopeerida ülalolev aadress.
2. Firefoxis minna läbi Lisade lehekülje Stylish alamlehele: Menüü [> Veel >] Lisad > Stylish;
3. Vajuta "Halda stiile" nupule;
4. Vajuta nupule "Install from URLs", aseta tekstiväljale ülalolev kopeeritud aadress. Vajuta Sobib/OK, kirjuta lisaks stiili nimi.
5. Postimehe töölaua-versioon peaks sestpeale olema nähtav mobiilidele sobilikul kujul.
6. Edaspidi tuleks eelistada Postimehe www-aadressi kujul www.postimees.ee
Ei garanteeri, et see kasutajastiil töötab kõigi peamiste Postimehe alamlehtedega (eriti Ilmajaam).
Reklaame see kasutajastiil otseselt ei blokeeri, kuid üldiselt olen lähtunud sellest, et Firefoxile Androidil on peale installitud skripte blokeeriv NoScript Anywhere laiendus, milles on antud postituse teemat silmas pidades lubatud peamiselt postimees.ee ja pmo.ee domeenid.
Tavalisest reklaamiblokeerijast, nagu Adblock Plus vms., on NoScript mitu korda efektiivsem ja vähem ressursinõudlik; leheküljed laevad kiiremini, ning selles oleva valge nimekirja abil on lubatud ainult need domeenid/võrgulehed, mida vaja.Läbides kõik need sammud ongi võimalik Android 2.3 opsüsteemis saada endale võimalus normaalselt lugeda Postimehe uudiseid ja hinnata artiklite kommentaare.
Inimestele läheb korda telefoni või tahvelarvuti akutarve. Skriptide blokeerimine lehitsejas säästab nii aega, akut, ning mobiil-Interneti kasutajatel ka raha.
Veidi ajaloost:
Valmistehtud stiililehe esialgne tulemus oli rahuldav, kuid alguses ei olnud mul veel õiget lahendust, mille abil olnuks võimalik PMO töölauaversiooni probleemivabalt kätte saada, isegi kui teatud olukordades paistis disain töötavat.
Hiliskevadel või suvel tõmbasin eksperimenteerimise käigus peale Firefoxil põhineva GNU IceCat lehitseja, millel pooljuhuslikult avastasin kasutajastringi muutmise võimaluse, ning ka selle, et erinevat kasutajastringi on võimalik seadistada erinevatele saitidele.
Sügisel avastasin lõpuks, et ka Firefox toetab sama funktsionaalsust; lihtsalt on see about:config lehel iseenesest mitteeksisteeriv ja user-agent string tuleb ise lisada.
Sunday, May 15, 2016
Useful apps exclusive to Android
This is a copy of a comment I wrote in a YouTube discussion to someone who recommended that "[I] get an iPhone".I've formatted and edited the comment with some additions into this blogpost. While it does harken back to a previous post I wrote about reducing one's Android's resource usage, then this one is more about some of the useful apps I use that are exclusive to Android.
An iPhone or any new smartphone is beyond my means, and I wouldn't be able to run some specific apps only available on Android, such as:
- Adblock Plus for Android. Works only on Wi-Fi, but blocks in-app ads;
- Firefox for Android. It's got Reader Mode, which saves an article, only keeps relevant article content, and allows white-on-black reading.
Firefox extensions, which only run on Firefox-based mobile browsers:
• NoScript Anywhere — blocks scripts and trackers run by scripts, and thus reduces browser resource usage. Its whitelist allows running scripts on sites I whitelist through the NoScript menu in Firefox;
• Privacy Settings — allows users to switch off a number of default Firefox settings to make the browser less resource-hungry and more secure;
• Stylish — allows users to locally change the appearance of webpages displayed in a browser (make them dark, etc. to save battery life). People can download or make their own userstyles.
• Save Link Menus — allows saving links or webpages from Firefox to the local file system.
- Vim Touch — a very advanced text editor. This adds to productivity (I can create and edit content);
- Hacker's Keyboard — I need this to use VimTouch, to easily navigate in text, and to quickly switch between languages without going to settings every time. This keyboard app is very lightweight compared to most native virtual keyboards;
- Unicode Map — to search for, view, and copy Unicode characters;
- VLC Media Player. 'Nuff said;
- Arity — a scientific calculator, but I sometimes use it to calculate expenses when shopping for multiple things with a limited budget.
- Sparse RSS — to subscribe to podcasts;
- Units — a very nice unit converter;
- MuPDF — a lightweight viewer for PDF, OpenXPS and CBZ files;
- Stock app —
- FM Radio. I can listen to plain FM radio and listen to great music for free and without ads. Estonia's public broadcaster ERR is just that awesome. They even provide small "what's playing" pages, so I can check out the artist and song.
FM radio functionality is not on most iPhone models, and not on most Windows phones either. My phone even supports RDS.
Some proprietary apps:
- TeamViewer — I sometimes do computer support for friends and relatives;
- The local weather widget.
This post is licensed under CC-BY-SA-3.0.
Tuesday, March 29, 2016
Pisut kriitikat "Postimehe" uue "mobiilielamuse" aadressil ja paar lahendust aeglastele nutitelefonidele
Kiirelt kirjutet ja sõnakas postitus, nii et kes loeb, on hoiatatud.
Kui anonüümne kommenteerimine oli võimalik, sai ka kommenteerida, ning artikleid sai samuti segamatult lugeda.
Siis tuli 2016.a. märtsi keskpaik ja natuke peale seda, kui PMO lugemiseks avaldati üks ressursimahukas äpp (õieti mobiiliversiooni uus wrapper), avaldati paar päeva hiljem ka sellele ekstra küljendatud spetsiaalne m.postimees.ee.
Lihtne oleks ju öelda, et juhe jooksis kokku.
Valesti läks see, et PMO uus versioon tehti automaatseks, mis uuendab sisu ise, mis omakorda on oma loomult päris ressursimahukas tegevus.
Tõepoolest — silmailu on, aga selle saavutamiseks on ohverdatud kasutatavust.
Tuleb nentida, et kasutatavuse huvides ei oleks mina m.postimees.ee varianti mobiilseadmete jaoks üldse käiku lasknud, sest u. 2016.a. märtsi teise pooleni üleval olnud ise-mitte-uuesti-laadiv lahendus töötas mobiili-Firefoxis hästi.
Niigi lülitati 2015. aastal välja Postimehe WAP/WML-versioon, mis oli ülikiire ja-mugav viis uudiste lugemiseks. Ma tõesti ei tea, mis WAP-versooni väljalülitamise põhjuseks võis olla, kuid kahtustan, et sellega oli võimalik lugeda ka selliseid artkleid, mis käisid tavapäraselt "Postimees Pluss" alla. Jaa, WAP (WML) eelised jõudsid kohale alles 10-15 aastat hiljem.
Selle toimetamiseks on niisiis vaja tekstiredaktorit; isiklikult soovitan kahte äppi:
Uuendatud 26.04.2016.
- Tingimused:
- Vanem nutitelefon, operatsioonisüsteemiks Android 2.3 Gingerbread.
Igal Androidil on vaikimisi lehitseja, mille kokkuleppeline nimi on "Android Browser"; kasutajaliideses lihtsalt "Internet".Android 2.3-ga kaasas käiv lehitseja on tehnoloogiliselt ja moraalselt vananenud, ning ei esita modernseid lehekülgi enam õigesti.
- Sellest johtuvalt on kaasaegsete mobiililehtede vaatamiseks peale pandud Firefox Androidile. Et see vanemal seadmel enam-vähem kasutatav oleks, on Firefoxi lehitsejas suurem osa ressursinõudlikke funktsioone välja lülitatud, samuti on peal laiendus NoScript Anywhere (edaspidi NoScript), mis blokeerib vaikimisi skriptid kõikidelt tundmatutelt saitidelt ja lubab käitada vaid kasutaja poolt hallatava valge nimekirja kaudu lubatud skripte. Väga mugav.
Kui anonüümne kommenteerimine oli võimalik, sai ka kommenteerida, ning artikleid sai samuti segamatult lugeda.
Siis tuli 2016.a. märtsi keskpaik ja natuke peale seda, kui PMO lugemiseks avaldati üks ressursimahukas äpp (õieti mobiiliversiooni uus wrapper), avaldati paar päeva hiljem ka sellele ekstra küljendatud spetsiaalne m.postimees.ee.
Lihtne oleks ju öelda, et juhe jooksis kokku.
Valesti läks see, et PMO uus versioon tehti automaatseks, mis uuendab sisu ise, mis omakorda on oma loomult päris ressursimahukas tegevus.
Tõepoolest — silmailu on, aga selle saavutamiseks on ohverdatud kasutatavust.
Tuleb nentida, et kasutatavuse huvides ei oleks mina m.postimees.ee varianti mobiilseadmete jaoks üldse käiku lasknud, sest u. 2016.a. märtsi teise pooleni üleval olnud ise-mitte-uuesti-laadiv lahendus töötas mobiili-Firefoxis hästi.
Niigi lülitati 2015. aastal välja Postimehe WAP/WML-versioon, mis oli ülikiire ja
Lahendus
Erinevalt töölaua-Firefoxis olevast NoScriptist ei ole Androidi-Firefoxis võimalik NoScripti valget nimekirja detailselt toimetada. Samuti ei võimalda mobiilse NoScripti kasutajaliides konkreetselt alamdomeenide lubamist/mittelubamist.26.04.2016: ^ Veidi täpsustatud sõnastust.Niisiis: Firefoxis on
about:config seadetest extensions.nsa.policy alt võimalik kopeerida JSON formaadis olevat valget/musta nimekirja, mida on küll võimalik teksti kujul toimetada, aga koodi iseärasuse tõttu saab seda teha ainult tekstiredaktoris.(Firefoxile mõeldud NoScript-i ametlik nimetus on NoScript Anywhere, ehk NSA...)Jama on selles, et see JSON-rida on pikk üherealine tekstijoru. (Õnneks on JSON formaat suhteliselt lihtsalt loetav.)
Selle toimetamiseks on niisiis vaja tekstiredaktorit; isiklikult soovitan kahte äppi:
- VIM Touch-nimelist tekstiredaktorit, mis on väike, võimas, ja algajale suhteliselt keeruline selgeks saada. A kui selge on, on lihtsam.
- Hacker's Keyboard, mis annab Samsung Keyboard vms asemel täieliku sõrmistiku kõigi vajalike nuppudega.
:s/\,/&^M/g eri reale, siis sorteerida, ning siis toimetada ja lisada domeeni järele 1 või 0; 1 vastavalt lubab, 0 keelab. Komad lõppu ka, v.a. kõigeviimane domeen. Ärge unustage tegemast varukoopiat. Supp seisneb selles, et PMO uudiste normaalseks lugemiseks tuli mul blokeerida ära http://m.postimees.ee ja lubada http://www.postimees.ee . Varem arvasin, et alamdomeene võis lubada ainulthttp://prefiksiga ja et ilma polnud võimalik; kuid vähemalt alates NoScript versioonist 3.5a11 sai seegi lõpuks võimalikuks.Siiski jäin endise praktika juurde, ning turvalised domeenid on vajadusel alatihttps://prefiksiga: näiteks kõik Google'i domeenid.
m.postimees.ee tuli blokeerida selleks, et uudiseid vaid lugeda; www ja kõik teised alamdomeenid lubasin selleks, et uudiseid kommenteerida (teoreetiline võimalus on olemas ju), ning mis põhiline — et kommentaare saaks reitida (lisada + või – ).pmo.ee teise taseme domen on vaikimisi lubatud, teised reklaami- ja muud domeenid mitte. Blokeeritud oli eraldi http://ads.postimees.ee . Sest akut peab säästma. PMO temaatilised alamdomeenid on kontseptuaalselt iseenesest hea, kuid kuna neid on palju, siis NoScripti valge nimekirja toimetamisel on nende käsitsi lisamine ebamugav. Vähemalt pole edaspidi vaja neid lubada/blokeerida. Reklaam ja reklaamiblokeerijad
Tõepoolest, "Postimees" elatub osaliselt ka reklaamirahast, kuid erinevalt kaasaegsetest PC-arvutitest on vanemate arvutite ja mobiilidega tihtipeale see lugu, et vähese võimsusega on ka sama vähe mõtet reklaame vaadata ja lugeda. Mobiil-interneti puhul tuleb arvestada ka sellega, et inimesed reklaamide tõmbamise eest tegelikult väga maksta ei taha.Miks mitte lisada PMO tellimus telefoniarvele näiteks?Võib ju väita, et vähevõimas nutitelefon on oma omaniku peegelpilt, aga niisuguseid inimesi on ka, ehk "üksteist peab hoidma," nagu ühes armsas laulus sõnat'. Hästivarustatud tavakasutaja koos uusima nutimudeli ja põhimõtteliselt piiramatu mobiilsidega selliste asjade pärast eriti muretsema ei pea. Kvaliteetväljaandena on Postimees Online on siiski üks väheseid, kus on huvitavaid ja informeerivaid reklaame, ning neile klikitakse/toksatakse vajadusel peale küll. Teadlik reklaamitarbija tõepoolest mõistab iga kliki/toksamise väärtust. Tõsi küll, võimalik on kasutada ERR-i kui tasuta uudistekanalit. Infoallikatena on PMO ja ERR mitmes mõttes asendamatud. Delfi kui uudisteallika väärtuse kohta 'ei kommentaari,' kuigi nene mobiilse veebi jaoks mõeldud lahendus paistab (pea) kõigist oma lugejaist hoolivat... või noh, oma lugejate mobiiltelefonidest... :> Lõpuks töötasin välja parima lahenduse võimalikest. Aga sellest juba tulevases postituses.
Uuendatud 26.04.2016.
Labels:
eesti keeles,
Firefox for Android,
NoScript,
Postimees,
workaround
Sunday, March 27, 2016
Firefox for Android on slow phones. Some practical advice.
This one was supposed to be a quick post; I might update it later on. And then I got carried away, and spent about four to six hours writing the post's content and refining its wording.
* That Firefox for Android can render better than the aged native browser on Android 2.3, is great, but at the moment, I won't go into detail about that.
* This post is not about desktop Firefox. I might write about issues current in desktop Firefox in a future post.
* My phone is slow now.
* What to do. Extensions to speed up Firefox
Until today, I have avoided that "What I Use" post, but every once in a while comes a time, when I am not afraid to write about what I use. Even if it's not the newest kit.
Then, after upgrading, I also discovered, that Firefox 45.0 turned to using the Firefox-native toolkit for its main menu, which is slower than the natively formatted main menu in Firefox 44.0.2 and earlier.
For this and then-the earlier issue, I decided to downgrade back to Firefox 44.0.2 from version 45.0. The slow and inefficient main menu became cause not to upgrade any further on my device—except for testing.
* The Galaxy Mini 2 has an 800 MHz Snapdragon S1 CPU (specifically, MSM7227A), which is on the lower end of processors built on the ARMv7-A architecture, and uses the ARM Cortex A5 processor core.
* The phone runs Android 2.3.6 "Gingerbread", and won't be upgraded to a newer offical Android version.
* The device has just enough minimum required RAM memory to run Firefox for Android.
This soup of specifications essentially shows what the minimum for running a very modern version of Firefox for Android can be.
That major apps — such as Facebook and games — are not present, is a given. I've also excised other apps that I did not deem necessary anymore: BBC, ERR, Postimees, and a local service provider's player app.
The obvious solution was to forbid
I'm also considering the Policy Control extension, as it would reduce resource usage even further, and introduce more fine-grained control over which website can use which resources.
* That Firefox for Android can render better than the aged native browser on Android 2.3, is great, but at the moment, I won't go into detail about that.
* This post is not about desktop Firefox. I might write about issues current in desktop Firefox in a future post.
Contents
* What happened* My phone is slow now.
* What to do. Extensions to speed up Firefox
Until today, I have avoided that "What I Use" post, but every once in a while comes a time, when I am not afraid to write about what I use. Even if it's not the newest kit.
Why I downgraded
After Firefox 45.0 was released, one early and now resolved issue was connection misbehavior with Firefox 45.0 and NoScript 3.5a10. Very soon, NoScript 3.5a11 was released, which fixed the issue.Then, after upgrading, I also discovered, that Firefox 45.0 turned to using the Firefox-native toolkit for its main menu, which is slower than the natively formatted main menu in Firefox 44.0.2 and earlier.
For this and then-the earlier issue, I decided to downgrade back to Firefox 44.0.2 from version 45.0. The slow and inefficient main menu became cause not to upgrade any further on my device—except for testing.
Note, that when upgrading or downgrading apps in Android, use the overwrite method when installing; Do not uninstall the existing app version to then install a different version, or this action will forever delete all your user data for the app.
Backround
Thus, it slowly dawned on me, that my phone is showing its age. It's a Samsung Galaxy Mini 2, which model was released four years ago,[as of March 2016] but I got it in late 2013 as a pass-me-down, after it had two nearly grave misadventures with its previous owner.* The Galaxy Mini 2 has an 800 MHz Snapdragon S1 CPU (specifically, MSM7227A), which is on the lower end of processors built on the ARMv7-A architecture, and uses the ARM Cortex A5 processor core.
* The phone runs Android 2.3.6 "Gingerbread", and won't be upgraded to a newer offical Android version.
* The device has just enough minimum required RAM memory to run Firefox for Android.
This soup of specifications essentially shows what the minimum for running a very modern version of Firefox for Android can be.
That major apps — such as Facebook and games — are not present, is a given. I've also excised other apps that I did not deem necessary anymore: BBC, ERR, Postimees, and a local service provider's player app.
What to do
In Firefox settings, disable telemetry and plugins. The Privacy Settings extension will make it simple to turn off other stuff.Extensions to speed up Firefox
The following details two extensions that I use in Firefox for Android to have a reasonably passable browsing experience.NoScript Anywhere.
In my phone, NoScript Anywhere ("NSA") makes browsing with Firefox a usable experience:NoScript blocks scripts and plugins from running, and users can use the NoScript menu item to create an internal domain-based whitelist of sites which won't work without scripts. With this, NoScript not only blocks scripts, but also advertisements generated by scripts.Another thing that shows the phone's age, is that the local daily "Postimees" launched a redesign of their mobile experience this month, and now their site redirects to their brand-new mobile site, which, if JavaScript-enabled, updates every ten minutes with AJAX, and that slows down the experience and the phone, and presumably eats away at the battery, too.
The obvious solution was to forbid
postimees.ee from running scripts, thus removing it from the allowed sites list. This mangled the design somewhat, but at least the site will display reasonably responsively. Yes, it's a simplistic workaround, but it makes it possible to read news there, even if the site is not functional. The functional part was the possibility to rate comments, but "Postimees" removed the ostensibly anonymous commenting functinality. Most people just don't care to create a burner account on social media, and neither do they care risking their primary social media/e-mail accounts.Privacy Settings
Another Firefox extension that reduces resource usage, is Privacy Settings. It's available at the Mozilla Add-ons site. With Privacy Settings, it's possible to switch off components that I don't have any need for. There are some settings that I have kept on, as switching all things to 'secure' may break rendering or accessing places like Instagram. While Privacy Settings won't work on older Firefox versions that can still run on Android 2.2 or earlier, or on ARMv6 CPUs, the extension's website has a breakdown of some of theabout:config settings that one can modify manually.I'm also considering the Policy Control extension, as it would reduce resource usage even further, and introduce more fine-grained control over which website can use which resources.
Labels:
Firefox for Android,
NoScript,
quick-and-dirty,
workaround
Subscribe to:
Posts (Atom)
Popular Posts
- Galaxy Note 7 and possible causes of fires
- The degrowth and stagnation of the United States and Russia, and the resilience of the European Union
- DataStore.edb and Windows Vista
- The official YouTube app no longer works on Android Gingerbread (2018). Remedies.
- Older Flashblock and NoScript for older Firefox and SeaMonkey versions

