SmartestHome/hosts/touch-panel/configs/firefox/user.js

46 lines
2.4 KiB
JavaScript

// Prefs for the touch panel's general-browsing Firefox profile. Installed by
// build-touch-panel-iso.sh into /home/<KIOSK_USERNAME>/.mozilla/firefox/web.
//
// Same shape as hosts/thin-client/configs/firefox/user.js — see that file's comment
// for why user.js (re-applied on every startup) rather than a one-shot prefs.js seed,
// and why anything expressible as enterprise policy lives in policies.json instead.
// Duplicated rather than shared between the two hosts on purpose — same call as
// admin-canvas/digest-canvas's SDK split in Phase 13: this profile is free to drift
// (touch-target padding, no ydotool-specific concerns) without touching the thin
// client's.
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
// First-run / post-update interstitials. An unattended panel has nobody to close them.
user_pref("browser.startup.homepage_override.mstone", "ignore");
user_pref("browser.aboutwelcome.enabled", false);
user_pref("browser.messaging-system.whatsNewPanel.enabled", false);
user_pref("trailhead.firstrun.didSeeAboutWelcome", true);
user_pref("datareporting.policy.firstRunURL", "");
user_pref("datareporting.policy.dataSubmissionPolicyBypassNotification", true);
// Session restore prompts after a power cut would leave the panel stuck on a
// "restore your session?" page nobody is there to click through.
user_pref("browser.sessionstore.resume_from_crash", false);
user_pref("browser.tabs.warnOnClose", false);
user_pref("browser.tabs.warnOnCloseOtherTabs", false);
user_pref("browser.warnOnQuit", false);
// No permission doorhangers on a shared touch panel. Autoplay is left blocked
// (unlike the thin client's digest canvas) — general browsing has no reason to want
// arbitrary pages making sound on a household wall panel.
user_pref("permissions.default.desktop-notification", 2);
user_pref("permissions.default.geo", 2);
user_pref("gfx.webrender.all", true);
// Touch-scrolling tuning: Firefox's Wayland/GTK touch handling is on by default, but
// the overlay/kinetic scrollbar reads better at panel viewing distance than the
// default desktop one.
user_pref("widget.gtk.overlay-scrollbars.enabled", true);
user_pref("browser.urlbar.suggest.topsites", false);
user_pref("browser.urlbar.suggest.quicksuggest.sponsored", false);
user_pref("browser.newtabpage.activity-stream.showSponsored", false);
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);