Commit graph

109 commits

Author SHA1 Message Date
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
7f5dddd387
policies.json: fix indent (MR 19) 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
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
Oliver Smith
4cc9e5f07a
userChrome/tabmenu: fix width for long titles (MR 19) 2021-12-05 11:45:41 +01:00
Oliver Smith
e7571365c1
userChrome/tabmenu: fix tiny height/jumping around (MR 19)
Apply a similar hack to the "all tabs" menu, as the appMenu has, so it
gets a proper height and doesn't jump above or below the "all tabs"
button, depending on the keyboard being displayed or not. With this
hack, it stays consistently above the button.
2021-12-05 11:45:41 +01:00
Oliver Smith
5f5cc3c09a
userChrome/tabmenu: always show "all tabs" button (MR 19)
Thanks to Peter Mack (linmob) for the idea and initial implementation.
2021-12-05 11:45:41 +01:00
Oliver Smith
af0073b014
userChrome/findbar: rework for FF 94 (MR 19)
Use multiple lines now, instead of making fonts tiny and hiding buttons.
2021-12-05 11:45:41 +01:00
Oliver Smith
eb890d187c
userChrome/urlbar: hide bookmarks toolbar (MR 19) 2021-12-05 11:45:41 +01:00
Oliver Smith
41e3f583ea
userChrome/appMenu: rework for FF 94 (MR 19)
Adjust the menu for Firefox 94, and for having the tab bar and search
bar at the bottom.

Getting the appMenu to look decent took me forever to figure out, here's
a notable alternative version that always uses the full screen height:

  #appMenu-popup {
        margin-top: calc(-1 * 100vh) !important;
        height: calc(100vh - 100px) !important;
        max-height: calc(100vh - 100px) !important;
  }

However with this alternative version, there's a bug when having the
keyboard open, then opening the menu (-> it will get spawned with about
half the screen size), and then closing the keyboard and opening the
menu again. The menu is cached (as one can see in the element inspector)
and still has the wrong height. The content inside the menu is
flickering between the full height and the half height.

By having a fixed size that looks good with both the keyboard open and
closed, we can work around this problem. The height of the keyboard was
adjusted for the PinePhone. If it doesn't look good on your device, add
a media query to make it have a different height based on the overall
height of the window (and possibly also width).
2021-12-05 11:45:41 +01:00
Oliver Smith
1a0ba21cc6
userChrome/urlbar: big search results on top (MR 19)
Cover the whole page, make it scrollable. Much more enjoyable to use.
2021-12-05 11:45:41 +01:00
Oliver Smith
3269089d1c
userChrome/urlbar: hide identity icon label (MR 19) 2021-12-05 11:45:41 +01:00
Oliver Smith
e2688f0e55
userChrome/browser: move nav bar to bottom (MR 19)
Based on MR 17 by plata-gl, thank you very much, and thanks to everybody
who answered the survey linked in that MR whether to make this default
or not.

I've left out padding-top since the additional 1px bar towards the top
looks like a bug, I've compared with Fennec on Android and it doesn't
have such a line. Also I've left out the inFullscreen lines from the MR,
not sure what they are for - we can still add them in a follow-up patch
if desired.
2021-12-05 11:45:41 +01:00
Oliver Smith
1143d383a3
treewide: format css files (MR 19) 2021-12-05 11:45:40 +01:00
Oliver Smith
83017c32ba
src/common/header.css: make it more fancy (MR 19) 2021-12-05 11:45:35 +01:00
Oliver Smith
c35fa5afaf
mobile-config-autoconfig: update user-agent (MR 16)
In the Tor browser user agent, the "geckotrail" part has been changed.
Apparently following an upstream change in Firefox:
> From Firefox 10 on mobile, geckotrail is the same as firefoxversion.

Note: I'm simply running latest Tor browser on Android and visit
websites showing the user agent to figure out the latest one. I tried to
figure it out from the source code once, but didn't find a place where
it could be looked up trivially (since it gets built of multiple
components etc.).

Related: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
2021-07-18 16:52:30 +02:00
Arnaud Ferraris
520fb81e16
mobile-config-autoconfig: allow user to change the user-agent (MR 16)
Preferences set with `pref()` can be changed by the user, but they're
then reset on each Firefox startup.

As users may want a different UA and keep it persistent, we should set
the default value with `defaultPref()` instead. This requires moving the
preference to the autoconfig file though, as `defaultPref()` isn't
recognized in the main config file.
2021-07-15 17:37:05 +02:00
Danct12
92e1a26c54
src/prefs.js: disable sandbox for non-ESR (MR 13)
https://support.mozilla.org/bm/questions/1236295#answer-1161622

Signed-off-by: Danct12 <danct12@disroot.org>
2021-06-04 22:36:02 +07:00
Oliver Smith
ef47ec8ff0
homepage: link to firefox PC addons page
Replace the generic addons links with ones that link to the addons for
the PC version of Firefox. Otherwise, because of the user-agent, we
would get redirected to the Android Firefox addons page.

Android addons are limited in their feature set.

Related: https://extensionworkshop.com/documentation/develop/differences-between-desktop-and-android-extensions/
2021-05-23 12:57:43 +02:00
Anri Dellal
185b3be0b6
Change about:preferences style (MR 10)
- Remove policy container as it is misleading and not required to access policy
  preferences
  (see https://gitlab.com/postmarketOS/mobile-config-firefox/-/merge_requests/10#note_581408851
  for more details);
- Move search bar to the left;
- Hide Firefox Mobile ad in #sync;
- Hide Sync illustration on small screens.
2021-05-23 12:45:17 +02:00
Anri Dellal
4f2204fdd7
Make about: pages more adaptive (MR 10)
Adds stylesheets for some "about:" pages, the pages were chosen depending
on importance for user.

preferences.css was moved to sidebar.css since changes in this file could
be applied for more pages and were related only to sidebar.

Adds copyrights
2021-05-23 12:45:07 +02:00
Oliver Smith
add285e514
treewide: bump copyright to 2021 2021-05-20 22:07:17 +02:00
plata
3a01c0e417
Save vertical space by drawing directly in the titlebar (MR 6) 2021-05-20 22:00:39 +02:00
plata
7bffd93c7b
Move header to common folder (MR 11)
Add the "do not edit" warning to both the generated userChrome.css and
userContent.css.
2021-05-20 21:56:48 +02:00
HenriDellal
f07fe00abd
Add dark theme for homepage (MR 5)
Adds @media query to set dark theme for systems with dark theme preference
2021-05-19 23:28:05 +02:00
Oliver Smith
58e38a543b
homepage: update text about changing preferences (MR 8) 2021-05-19 23:22:43 +02:00
HenriDellal
e940cac4e1
preferences.css: various tweaks (MR 8)
* center icons in sidebar
* make it adaptive
2021-05-19 23:22:43 +02:00
plata
0765d1a25f
Add CSS for about:preferences (MR 8) 2021-05-19 23:22:43 +02:00
Paper
dd8dadbdfe
policies.json: disable Pocket (MR 3) 2021-03-01 20:55:35 +01:00
Oliver Smith
ed675f4294
homepage: update note on how to install add-ons
addons.mozilla.org displays the following message when visiting it with
the Android Firefox user agent now, while also graying out the usual
button to install the add-on:
	You can install this add-on in the Add-ons Manager. Learn more
	about add-ons for Android.
It is not possible to use a different user agent just for this website
anymore, as it used to be with "general.useragent.site_specific_overrides"
(see https://bugzilla.mozilla.org/show_bug.cgi?id=1589607). Therefore,
just explain that one can press the "Download file" button to install
add-ons.
2020-11-25 19:22:25 +01:00
Oliver Smith
59bb1d69ee
popup-notification: decrease font-size
When trying to install uBlock origin as suggested on the start page, I
found that the text of the popup is taking up so much space that the
"Add" / "Cancel" buttons are missing again. Decrease the font size even
further (like in the "Site information"), so the buttons are visible
again.

If somebody wants to improve this: maybe we could give the
popup-notification-body a fixed height instead, and make it scrollable?
Patches welcome, and see README.md for instructions how to use the
Firefox developer tools with the browser UI itself.
2020-11-25 19:22:25 +01:00
Oliver Smith
16d401243f
user-agent: update to 78 from Tor browser Android 2020-11-25 19:22:25 +01:00
Oliver Smith
94f48b2c87
userChrome: fix convergence usage case
Only apply rules from userChrome.css if the screen width is 700px or
less.
2020-11-25 19:21:56 +01:00
Oliver Smith
a863f41268
urlbar: don't do extra extension to left and right
Remove the rule that makes it go 50px to the left and 20px to the right.
While this added some more space for editing the URL, it looked weird.
After having used it for a while, I think it's better to remove this
again.
2020-11-25 19:19:02 +01:00
Oliver Smith
5024266a1b
Remove FF 68 specific code and mentions
This version isn't supported by Mozilla anymore, so drop related
configuration.
2020-11-25 19:18:58 +01:00
Oliver Smith
8ffc75757f src/prefs.js: rename to src/mobile-config-prefs.js (MR 2)
Give the file the same name in the source dir, as it will have after
installing.
2020-08-21 10:50:21 +02:00
Arnaud Ferraris
ca344c8514 userChrome: instruct users to edit the file under /etc (MR 2)
The userChrome.css in the user's profile will be overwritten when the
package is upgraded.

Any change should therefore be made to the file located under /etc,
which should then be left untouched by most package managers.
2020-08-21 10:50:21 +02:00
Arnaud Ferraris
712b850c3b install userChrome.css using autoconfig instead of schell scripts (MR 2)
Firefox can run an autoconfig Javascript on startup, which can be used to
install and update userChrome.css, both when creating a new profile and
using a pre-existing one.

This removes the need for a wrapper script and related complications
(changes to $PATH, different processing for new and pre-existing
profiles...)

Co-Authored-By: Oliver Smith <ollieparanoid@postmarketos.org>
2020-08-21 10:49:49 +02:00
Oliver Smith
01e16c2db5
homepage: link to new mobile-config-firefox repo 2020-08-11 00:31:24 +02:00
Oliver Smith
da87934f4b
homepage: no android in add-ons links 2020-08-11 00:31:19 +02:00
Oliver Smith
f3daef8ea0
findbar.css: use [anonid="findbar-textbox"]
This works in FF 68 ESR too, the previous rule did not.
2020-08-10 21:29:07 +02:00
Oliver Smith
61977c2570
urlbar.css: add rules for FF 68 ESR 2020-08-10 21:29:07 +02:00
Oliver Smith
88befd38b9
policies.json: don't disable developer tools
The reason for disabling these was, to free up space in the menu. The
menu entry is hidden in userChrome.css now, so we can enable it again.
Having this enabled is required to use the Firefox remote debugger,
which is very useful for developing userChrome.css.
2020-08-10 21:29:07 +02:00
Oliver Smith
8624a27fd7
prefs.js: remove browser.uiCustomization.state
This is done via userChrome.css now, which is easier to maintain (not
all crammed into one JSON line).
2020-08-10 21:29:07 +02:00
Oliver Smith
5126c08b2e
urlbar.css: don't increase font size on focus
This looks weird and there isn't much difference between 9pt and 10pt.
2020-08-10 21:29:07 +02:00
Oliver Smith
df3cb1b051
popups.css: new file 2020-08-10 21:29:07 +02:00
Oliver Smith
1fa368117b
findbar.css: new file 2020-08-10 21:29:07 +02:00
Oliver Smith
37b14e3c8b
wrapper: fix second start with wrong profile
Always start with --profile if there is no profiles.ini. Otherwise,
firefox will create and use the profile for the first start only, but
not set it as default. It would create a new profile on the second start
then.
2020-08-10 21:29:07 +02:00
Oliver Smith
df9ac23760
src/prefs.js: less animations, one click urlbar select
Thanks to Matej Ľach for suggesting these preferences in:
https://gitlab.com/postmarketOS/pmaports/-/merge_requests/1488
2020-08-10 21:29:02 +02:00
Oliver Smith
49698e65c5
src: wrap firefox binary, not .desktop entry
Instead of trying to override the .desktop entry of Firefox by
installing the custom one and adjusting XDG_DATA_DIRS, just wrap the
firefox binary directly and adjust PATH. The former did not work with
Phosh, and on second thought, wrapping the binary is what's really
necessary. The launcher would have been just another useless layer.
2020-08-07 23:16:13 +02:00
Oliver Smith
dd57cf378e
bottom.html: less redundant privacy note 2020-08-06 17:01:15 +02:00
Oliver Smith
34c8b53622
License under GPL-3.0-or-higher 2020-08-06 17:01:14 +02:00
Oliver Smith
87d4ae0ca3
mobile-config-firefox: create userChrome.css symlink 2020-08-06 17:01:14 +02:00
Oliver Smith
00db529a04
src/prefs.js: allow userChrome.css/userContent.css 2020-08-06 17:01:14 +02:00
Oliver Smith
c1eafe0f8f
Remove most mentions of pmOS / make them optional 2020-08-06 17:01:14 +02:00
Oliver Smith
2908848f3d
userChrome: add initial version
Screenshots: https://gitlab.com/postmarketOS/pmaports/-/issues/701#note_391806241
2020-08-06 17:01:14 +02:00
Oliver Smith
c6debeb660
Initial: import from postmarketos-config-firefox
Related: https://gitlab.com/postmarketOS/pmaports/-/merge_requests/1445
2020-08-06 17:01:09 +02:00