Skip to content

Instantly share code, notes, and snippets.

@slikts
Last active April 30, 2020 04:00
Show Gist options
  • Save slikts/a2035246e462ac2bcd3acbe08689a266 to your computer and use it in GitHub Desktop.
Save slikts/a2035246e462ac2bcd3acbe08689a266 to your computer and use it in GitHub Desktop.
Jellyfin customization using an nginx reverse proxy

Using nginx HTTP substitution module to customize Jellyfin.

  1. Create /config/custom and place script.js and style.css in it
  2. Edit nginx configuration to serve and inject the script
location /custom {
root /config;
expires -1;
}
location / {
sub_filter '<meta property="og:title" content="Jellyfin">' '<script defer src="/custom/script.js"></script>';
sub_filter_once on;
proxy_set_header Accept-Encoding "";
# … rest of config
}
const style = document.createElement('link');
style.setAttribute('rel', 'stylesheet');
style.setAttribute('href', '/custom/style.css');
document.head.appendChild(style);
.videoOsdBottom .osdTextContainer,
.videoOsdBottom .osdPoster {
display: none !important;
}
.videoOsdBottom {
padding: 0 !important;
}
.osdControls .buttons {
padding-top: 0 !important;
}
.headerTop {
padding: .2rem 0 !important;
}
.buttons button {
padding: .2rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment