Commit graph

80 commits

Author SHA1 Message Date
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
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
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
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