Using nginx HTTP substitution module to customize Jellyfin.
- Create
/config/custom
and placescript.js
andstyle.css
in it - Edit nginx configuration to serve and inject the script
Using nginx HTTP substitution module to customize Jellyfin.
/config/custom
and place script.js
and style.css
in itlocation /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; | |
} |