Commit graph

151 commits

Author SHA1 Message Date
Ulrik de Muelenaere
21163be169
autoconfig: Fix error due to Services import in FF 117 (MR 36)
Since Firefox 104 the Services global is available automatically and no
longer needs to be imported, and since Firefox 117 importing it is an
error.
2023-09-05 22:53:14 +02:00
Seth Falco
9c780dabb8
fix: add mobile to user-agent (MR 35) 2023-09-01 16:02:07 +02:00
Seth Falco
e1c533d84e
fix: don't override user-agent (MR 34) 2023-07-23 21:52:36 +01:00
Ulrik de Muelenaere
cc4a4a791b
autoconfig: Fix version detection on first start (MR 32)
Previously the Firefox version would be detected as 0 on the first
start, causing popups.before-ff-108.css to be included even on newer
versions, which breaks touch input.
2023-07-03 15:49:49 +02:00
Ulrik de Muelenaere
3959e7c476
userChrome/tabmenu: Add note to a declaration obsoleted in FF 113 (MR 31)
Firefox 113 changes from 'display: -moz-box' to 'display: flex', so the
-moz-box-flex property should be changed to flex-grow. However, that
breaks the tab menu, and it doesn't seem to be necessary anyway.
2023-05-28 20:27:54 +02:00
Ulrik de Muelenaere
4a53e32a5c
userChrome/tabmenu: Fix max width of tab menu in FF >= 106 (MR 31) 2023-05-28 20:27:54 +02:00
Ulrik de Muelenaere
8cbf7c9e30
userChrome/tabmenu: Fix height of tab menu in FF 113 (MR 31)
Without this fix, the tab menu is only tall enough for 2 or 3 entries.

This is an update of the rule directly above it, changing the ID and
changing from a calculated height to a fixed height matching its child
#allTabsMenu-allTabsView. With the calculated height, the menu entries
were offset above the top of the menu. The previous rule no longer seems
to be necessary, at least in Firefox 102 and newer, since
#allTabsMenu-multiView does not exist.
2023-05-28 20:27:54 +02:00
Ulrik de Muelenaere
3dcfd01d09
userChrome/browser: Fix bottom navigation bar in FF 113 (MR 31)
Firefox 113 changes from 'display: -moz-box' to 'display: flex', so we
need to use the order property instead of -moz-box-ordinal-group.
2023-05-28 20:27:54 +02:00
Oliver Smith
5402fa0f52
README: log file: add tail -F to example 2023-05-28 20:25:35 +02:00
Oliver Smith
758b9c3a17
mobile-config-autoconfig: fix 2x restart
On first start, only restart Firefox once after the files are
installed.

[2023-04-18 07:07:05] Running mobile-config-autoconfig.js
[2023-04-18 07:07:05] Couldn't get Firefox version (expected on first start): TypeError: Services.appinfo.lastAppVersion is null
[2023-04-18 07:07:05] Firefox version: 0 (previous: unknown)
[2023-04-18 07:07:05] Creating CSS file from fragments: /home/user/.mozilla/firefox/ah7sid6m.default-release/chrome/userChrome.css
…
[2023-04-18 07:07:05] Updating previous Firefox version to: 0
[2023-04-18 07:07:05] Triggering Firefox restart
[2023-04-18 07:07:05] Done
[2023-04-18 07:07:11] Running mobile-config-autoconfig.js
[2023-04-18 07:07:11] Firefox version: 102 (previous: 0)
[2023-04-18 07:07:11] Reading fragments from file: /etc/mobile-config-firefox/userChrome.files
[2023-04-18 07:07:11] Fragment with FF version check included: userChrome/popups.before-ff-108.css
[2023-04-18 07:07:11] File is up-to-date: /home/user/.mozilla/firefox/ah7sid6m.default-release/chrome/userChrome.css
[2023-04-18 07:07:11] Reading fragments from file: /etc/mobile-config-firefox/userContent.files
[2023-04-18 07:07:11] File is up-to-date: /home/user/.mozilla/firefox/ah7sid6m.default-release/chrome/userContent.css
[2023-04-18 07:07:11] Updating previous Firefox version to: 102
[2023-04-18 07:07:11] Setting default preferences
[2023-04-18 07:07:11] Done
2023-04-18 09:17:40 +02:00
Oliver Smith
c9a1f7af23
mobile-config-autoconfig: tweak css_files_update
Refactor the condition code, so it's easier to read.
2023-04-18 09:17:40 +02:00
Oliver Smith
aaa603fae7
autoconfig: get_firefox_version: add try…catch
On first run / after:
$ rm ~/.mozilla

The function fails with:
TypeError: Services.appinfo.lastAppVersion is null

Expect the failure so the script doesn't crash.
Revert "autoconfig: get_firefox_version: remove try…catch", but
with another error message.

Without this patch an error shows up when starting Firefox with the
config, until the user manually starts it again.

This reverts commit 2405aabd4c.
2023-04-18 09:17:40 +02:00
grreby
b6227bde5f
add links to pmos wiki, add example of network location (MR 30) 2023-04-14 22:09:22 +00:00
Oliver Smith
3b3c589d44
editBookmarkPanel: adjust for current non-ESR FF
Make the bookmarks panel usable again by hiding all controls except for
the name, the "show editor when saving" checkbox and the remove bookmark
/ save buttons.
2023-04-07 01:24:15 +02:00
Oliver Smith
60c7a64c1f
autoconfig: disable firefox-view feature 2023-04-07 01:24:15 +02:00
Oliver Smith
4d9ae227e2
autoconfig: move set_default_prefs down
This part is unrelated to generating the CSS files, so move it towards
the end.
2023-04-07 01:24:15 +02:00
Oliver Smith
c16d19c3f5
README: mention the new log file 2023-04-07 01:24:14 +02:00
Oliver Smith
d2992be5eb
autoconfig: move chrome_dir_init code to function 2023-04-07 01:24:14 +02:00
Oliver Smith
bcaa46fa09
autoconfig: update comment on top of the file 2023-04-07 01:24:14 +02:00
Oliver Smith
2405aabd4c
autoconfig: get_firefox_version: remove try…catch
There is a try…catch around main() now, which logs the exception and
fails with an error that is visible for the user.
2023-04-07 01:24:14 +02:00
Oliver Smith
77e8101caf
autoconfig: store/compare the major FF version
Don't regenerate the firefox config if a part of the version changed
that isn't the major version as this would just lead to needless
regernations and slightly delayed startup.
2023-04-07 01:24:14 +02:00
Oliver Smith
7bfb0ff32f
autoconfig: move log_init code to function 2023-04-07 01:24:14 +02:00
Oliver Smith
314f7a0b04
autoconfig: prefix global variables with g_ 2023-04-07 01:24:14 +02:00
Oliver Smith
ee8d8382d5
userChrome/popups: FF >= 108: fix broken touch
Split the #mainPopupSet CSS rule to an extra file
popups.before-ff-108.css, and adjust autoconfig.js to skip that file if
firefox is newer than >= 108.
2023-04-07 01:24:14 +02:00
Oliver Smith
e2f29799c6
autoconfig: wrap most code in try…catch
Make debugging easier by printing exceptions to the log. For example:

  main() failed: TypeError: fragment.contains is not a function
2023-04-07 01:24:14 +02:00
Oliver Smith
49e6a9866b
autoconfig: regenerate CSS when FF version changes 2023-04-07 01:24:14 +02:00
Oliver Smith
1b0c066793
autoconfig: add write_line() helper func 2023-04-07 01:24:14 +02:00
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