# Firefox

## Reset ugly Proto UI

First you need to enable custom CSS by opening "about:config" in a tab. There you need to set the option `toolkit.legacyUserProfileCustomizations.stylesheets` to `true`.

Afterwards you need to create a directory called `chrome` (sic!) in your Firefox profile directory. In there you need a file called `userChrome.css`.

The following content of the file will make it look more like the old Firefox UI:

```css
.titlebar-color {
  color: -moz-accent-color-foreground;
  background-color: -moz-accent-color;
}

.tab-background {
  border-radius: 0px 0px !important;
  margin-bottom: 0px !important;
}

.tabbrowser-tab:not([selected="true"]):not([multiselected="true"]) .tab-background {
  background-color: color-mix(in srgb, currentColor 5%, transparent);
}

.tabbrowser-tab:not([selected="true"]) > .tab-stack > .tab-background {
  border: 1px solid rgba(130, 130, 130, 0.5) !important;
}

.tabbrowser-tab[selected="true"] .tab-background {
  border-top: 3px solid #3daee9 !important;
  border-left: 1px solid rgba(130, 130, 130, 0.5) !important;
  border-right: 1px solid rgba(130, 130, 130, 0.5) !important;
}

.toolbar-items, .tabbrowser-tab {
  max-height: 38px;
}

:root[uidensity=touch] .toolbar-items, .tabbrowser-tab {
  max-height: 45px;
}

.tabbrowser-tab[usercontextid] .tab-background {
  background: var(--identity-tab-color) !important;
  border-left: 1px solid rgba(130, 130, 130, 0.5) !important;
  border-right: 1px solid rgba(130, 130, 130, 0.5) !important;
  border-bottom: var(--identity-tab-color) !important;
  opacity: 0.8 !important;
}

menupopup > menu, menupopup > menuitem {
  padding-block: 2px !important;
}

:root {
  --arrowpanel-menuitem-padding: 2px !important;
}
```

For a description of what this CSS does please see the original [source](https://www.dedoimedo.com/computers/firefox-91-disable-proton.html).

## Enable use of flash player plugin

**WARNING**: You are creating a Firefox browser which can use **deprecated**, **unsafe** plugins like Flash or Java. Please keep in mind to only access safe webpages with it. **You have been warned!**

Links:
* [Superuser.com - How to circumvent to disablement of flash plugin](https://superuser.com/a/1617236/1446767)

1. Download and install an older version of Firefox, e.g. version 51
2. Install flash plugin
3. Create a separate user profile for this installation
4. Symlink `libflashplugin.so` to `<user-profile-dir>/plugins/`
5. Edit `/etc/adobe/mms.cfg` and add the following lines:
   ```
   AllowListUrlPattern=https://example.url
   EOLUninstallDisable=1
   ```
   You may specify `AllowListUrlPattern` multiple times for multiple urls. `AllowListUrlPattern=*` or `AllowListUrlPattern=https://*` won't work
6. Start Firefox with new profile like this: `</firefox-path>/firefox --profile <profile-path> --no-remote`
    * Use `--no-remote` to create a new window in a new session
    * Otherwise an already open Firefox would spawn a new window
