Commit graph

124 commits

Author SHA1 Message Date
Oliver Smith
fe45bbc8dc
Combine the CSS files on FF startup
Instead of combining the CSS files during make, just install all of the
fragments and let mobile-config-autoconfig.js combine them.
2023-04-07 01:24:14 +02:00
Oliver Smith
d676f135a8
editorconfig: use tabs in Makefile 2023-04-07 01:24:14 +02:00
Oliver Smith
473cb45ee7
autoconfig: add get_firefox_version function 2023-04-07 01:24:14 +02:00
Oliver Smith
a9dbfcd48b
autoconfig: add log_obj debug function
As the API isn't well documented, add this helper function to log object
properties.
2023-04-07 01:24:13 +02:00
Oliver Smith
4b559c6ec6
autoconfig: don't set default_prefs during restart
As the restart doesn't happen instantly, don't set the default
preferences in the restart code path. Split both code paths into
functions while at it.
2023-04-07 01:24:13 +02:00
Oliver Smith
b6bde3dfae
autoconfig: add log function
It's pretty hard to get the code right in this autoconfig script, as the
only feedback you get is whether the script crashed or not. Add a
logging function to make it easier.
2023-04-07 01:24:13 +02:00
Oliver Smith
9e8c97e894
autoconfig: fix indentation
Indent these two lines, so it's visually clear that they are part of the
condition.
2023-04-07 01:24:13 +02:00
jane400
8e59b386e3
mobile-config-prefs.js: enable TouchEvents API for mobile detection (MR 29) 2023-04-03 10:38:11 +02:00
bgkillas
02df05f8e9 update useragent to help captchas 2023-03-09 00:00:46 +00:00
Adam Thiede
c057a768e6
change user-agent version 91->102 (current with tor browser on android) (MR 27) 2023-01-30 06:45:38 -06:00
Arnaud Ferraris
fbc916b447
mobile-config-autoconfig: restart Firefox on update
With the current implementation, `userChrome.css` and `userContent.css`
are effectively replaced on a package update, but the session still uses
the previous version.

Triggering a restart as soone as those files are updated ensures the
latest version will be used immediately.
2022-12-14 09:46:21 +01:00
primalmotion
d661fc1666
fix: various popups flickering (MR 25)
The protection, identity, permissions and widget overflow popups were
flickering when their width was larger than the screen. This patch
bounds the width of the viewport.
It also makes the overflow menu use as much vertical real estate as
possible, as this seems to fix flickers for extensions.
2022-12-13 15:48:35 -08:00
Teemu Ikonen
ff2f07873f
userChrome/popups.css: Hide some context menu items (MR 24) 2022-09-05 00:20:59 +03:00
Oliver Smith
87689ef2e2
treewide: bump copyright to 2022 2022-01-30 11:59:57 +01:00
Oliver Smith
75c57aa3aa
treewide: change license to MPL-2.0
Adjust the license to be able to upstream adjustments from this
repository to upstream Firefox. I've asked all contributors if they are
fine with the license change in the related issue.

Fixes: https://gitlab.com/postmarketOS/mobile-config-firefox/-/issues/31
2022-01-30 11:59:52 +01:00
plata
16a4471b73
mobile-config-prefs.js: fix titlebar for plamo (MR 23)
Instead of moving tabs into the title bar, hide it completely on Plasma
Mobile, now that the tabs are at the bottom.
2022-01-09 12:18:08 +01:00
plata
c3d0eada96
README: add resource "How to use the Firefox Browser Toolbox" (MR 22) 2021-12-15 23:32:48 +01:00
Jami Kettunen
f644112795
Makefile: remove unused variables (MR 21)
HOMEPAGE_FILES and DISTRO are completely unused since 559d486
("Homepage: set to about:home (MR 19)") so remove them.
2021-12-12 23:36:37 +02:00
Oliver Smith
32e4fb261c
userChrome/popups: move backForwardMenu on screen
Make sure the menu that gets opened when long-pressing the back button
is visible on screen. Note that this is useful not only for navigating
back, but can be used to navigate forward too, and to navigate back to
the new tab/home page.
2021-12-12 14:42:02 +01:00
Oliver Smith
e5ee057e95
userChrome/browser: fix kiosk mode
Make sure the navigation bar is hidden again in kiosk mode. This patch
adds the rest of MR 17 and a comment why it makes sense here.

Fixes: #29
2021-12-12 14:41:57 +01:00
Oliver Smith
c58bdd7b1b
README.md: update
Link to screenshot thread, link to ublock origin commit with detailed
reasoning.
2021-12-05 15:28:53 +01:00
Oliver Smith
94480ad5f7
CI: run .ci/lint.sh (MR 19) 2021-12-05 11:48:34 +01:00
Oliver Smith
85170ef7e5
README.md: update for new FF >= 91 version (MR 19)
Update to reflect changes. Remove the part about packaging for distros,
since lots of distributions have packaged this already and now that the
custom home page is removed, the steps are like any other make-based
project. Add notes about coding guidelines etc.
2021-12-05 11:45:43 +01:00
Tim Magee
f3bd649619
userContent/reader: make reader view adaptive (MR 19)
Picked from MR 20, with lint fixes.
2021-12-05 11:45:43 +01:00
Oliver Smith
d55bd0431d
userChrome/popups: make downloadsPanel adaptive (MR 19) 2021-12-05 11:45:43 +01:00
Oliver Smith
6bbf387f58
userChrome/popups.css: rework (MR 19)
Finally get rid of the tiny fonts hack. With the current config, we only
need an offset.
2021-12-05 11:45:43 +01:00
Oliver Smith
ab46ecdf00
userChrome/tabmenu: make it work with private mode (MR 19)
Always reserver the space for the private browsing indicator, even if
not in private mode. This allows using the same width for the displayed
tab in both modes. Without this, the X of the tab is not visible in
private mode.

I think it's nice to have this space in both modes to quickly close the
menu, as it's right above the menu button.
2021-12-05 11:45:43 +01:00
Oliver Smith
7b8adcd0c9
userChrome/urlbar: tweak padding (MR 19)
Add a bit of padding to the left and to the right.
2021-12-05 11:45:43 +01:00
Oliver Smith
fa17075a6d
userChrome/urlbar: hide robot icon on focus (MR 19)
This one is for being connected with the debugger. It's hard to edit the
CSS to make the urlbar look good with the debugger, if being connected
with it gives it another apperance. I'm currently fixing up the padding
to the left where the icon is, so disable it.
2021-12-05 11:45:43 +01:00
Oliver Smith
9bf6b83a29
userChrome/urlbar: update page-action-buttons id (MR 19)
Fix hiding the bookmark icon inside the urlbar, while the urlbar is
focused (to gain more editing space) in newer FF versions.
2021-12-05 11:45:42 +01:00
Oliver Smith
9b555ef2e9
autoconfig: set browser.newtabpage.enabled (MR 19)
Now that there's a nice about:home page, show it in new tabs too instead
of the weird looking blank page. Set this in autoconfig.js instead of
policies.json, so it can be overridden by the user via settings page.
2021-12-05 11:45:42 +01:00
Oliver Smith
cdf699bfd1
userContent/home: make adaptive (MR 19) 2021-12-05 11:45:42 +01:00
Oliver Smith
511f62ac7b
userChrome/urlbar: hide amazon icon (MR 19) 2021-12-05 11:45:42 +01:00
Oliver Smith
95710f0b98
autoconfig: don't suggest search engines in urlbar (MR 19) 2021-12-05 11:45:42 +01:00
Oliver Smith
f770c747d3
autoconfig: don't suggest topsites in urlbar (MR 19) 2021-12-05 11:45:42 +01:00
Oliver Smith
a5ccdf0ffe
policies: disable UserMessaging/SkipOnboarding (MR 19)
Disable the last item in UserMessaging too. Onboarding messages look
like this:
https://support.mozilla.org/en-US/questions/1202153
2021-12-05 11:45:42 +01:00
Oliver Smith
559d48638e
Homepage: set to about:home (MR 19)
Use the standard Firefox homepage as default homepage. The information
on the previous homepage is mostly obsolete, and this makes it look much
nicer.
2021-12-05 11:45:42 +01:00
Oliver Smith
af7c250fe3
policies.json: configure firefox home (MR 19)
Disable everything but the search bar. This gives a clean page, of a
cog wheel on the top right where the user can adjust it as they want
(e.g. enable most frequently visited pages), then the FF logo and the
search bar.

I've considered enabling TopSites in order to show the most frequently
visited sites according to the browser's history. However, this also
enables built-in links to youtube, facebook, reddit, amazon, twitter.
And while it is convenient to have links you frequently visit available
(based on your history, not these built-ins!), getting an almost blank
page instead is actually a good idea to reduce the bad pattern of
opening a web browser and then forgetting your original intention until
it opens, and instead surfing mindlessly on the most recently visited
websites. The almost blank page gives the user a moment to think about
what they really want to do.
2021-12-05 11:45:42 +01:00
Oliver Smith
160a1056c2
policies.json: install uBlock origin by default (MR 19)
Here's something controversial. Install the wide-spectrum blocker uBlock
origin by default. This enables blocking of ads, trackers and malware
sites. I think these should be blocked for several reasons:

1. Performance on mobile devices

It's clear when browsing the web with this add-on, that there is a major
performance benefit in blocking advertising and tracking on websites. We
don't have these resources to waste on Mobile Linux.

2. Privacy

From uBlock origin's README.md:
> [...] it's important to note that using a blocker is NOT theft. Don't fall
> for this creepy idea. The ultimate logical consequence of blocking = theft
> is the criminalisation of the inalienable right to privacy.

> Ads, "unintrusive" or not, are just the visible portions of privacy-invading
> apparatus entering your browser when you visit most sites nowadays. uBlock
> Origin's main goal is to help users neutralize such privacy-invading
> apparatus — in a way that welcomes those users who don't wish to use more
> technical, involved means (such as uMatrix).

3. Manipulation

Modern advertising platforms are used to manipulate people in the scale
of influencing elections of world leaders. From Cambridge Analytica and
similar companies' perspective, one of the workflows is showing the user
an advertisement, then monitoring search queries to determine if the ad
was effective, then adjusting the ad to convince you better to vote for
a certain party, repeat. This has severe negative effects on society,
for people unfamiliar with the topic I recommend watching the movies
"The Great Hack" and "The Social Dilemma". The mentioned workflow is
described in the "Your Undivided Attention" podcast, episode 10, "Rock
the Voter" in an interview with a former Cambridge Analyticer insider.

Related: https://github.com/gorhill/uBlock
Related: cab6a5076c/README.md (policiesjson-45)
Related: https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/
2021-12-05 11:45:42 +01:00
Oliver Smith
76dc2a742c
policies.json: remove most default search engines (MR 19)
Keep DuckDuckGo (still set as default) and Wikipedia. This part of the
json file was generated with contrib/extract-search-engines.sh.
2021-12-05 11:45:42 +01:00
Oliver Smith
654616ab46
contrib/extract-search-engines.sh: new file (MR 19)
Add a script that allows extracting the list of search engines enabled
in the current firefox build. There is no way to simply disable all
built-in search engines, so we need a list like this. Note that the
search engines can only be removed in the ESR version. I've briefly
tried to find such a list in the source code, but didn't find it without
spending too much effort. Besides, I'm guessing that in the source code
it's stored in almost the same format found in the "omni.ja" zip
archive.
2021-12-05 11:45:42 +01:00
Oliver Smith
445c1da339
CI: lint: detect indent errors in json (MR 19)
Lines in policies.json start with ".
2021-12-05 11:45:42 +01:00
Oliver Smith
7f5dddd387
policies.json: fix indent (MR 19) 2021-12-05 11:45:42 +01:00
Oliver Smith
fa65935111
CI: lint: fix not working as pre-commit symlink (MR 19)
Throw in another realpath, so TOPDIR works as expected after:
  ln -s $PWD/.ci/lint.sh .git/hooks/pre-commit
2021-12-05 11:45:42 +01:00
Oliver Smith
5b1ace4f24
autoconfig.js: fix indent (MR 19) 2021-12-05 11:45:41 +01:00
Oliver Smith
a8cbf4f950
CI: lint: show "src" in error message too (MR 19) 2021-12-05 11:45:41 +01:00
Oliver Smith
6f4285e957
CI: lint: check js, json too (MR 19) 2021-12-05 11:45:41 +01:00
Oliver Smith
0b38379d61
user-agent: update to latest tor browser's UA (MR 19)
As of writing (2021-12-04), the latest tor browser for android version
is 10.5.9 (91.2.0-Release) and has this user-agent.
2021-12-05 11:45:41 +01:00
Oliver Smith
3d3ef8a516
userChrome/editBookmarkPanel: new file (MR 19)
After a boatload of trail and error, here's a config that appears to be
working well with the editBookmarkPanel.
2021-12-05 11:45:41 +01:00
Oliver Smith
8759370c25
userChrome/appMenu: hide fullscreen button (MR 19) 2021-12-05 11:45:41 +01:00