aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorkontrollanten <6680299+kontrollanten@users.noreply.github.com>2020-12-08 14:51:51 +0100
committerChocobozzz <chocobozzz@cpy.re>2020-12-14 15:25:51 +0100
commit2564d97e0d77340ede0031936082cc37d6f8fd79 (patch)
tree3bf53a1e78d3f591c9007f0a2f942c168859a5bd
parentea5cdc11ff76d6292351ffc5dbbd00e44bfd7cca (diff)
downloadPeerTube-2564d97e0d77340ede0031936082cc37d6f8fd79.tar.gz
PeerTube-2564d97e0d77340ede0031936082cc37d6f8fd79.tar.zst
PeerTube-2564d97e0d77340ede0031936082cc37d6f8fd79.zip
video-embed: inject custom CSS
closes #3420
-rw-r--r--client/src/standalone/videos/embed.html1
-rw-r--r--client/webpack/webpack.video-embed.js10
-rw-r--r--server/lib/client-html.ts1
3 files changed, 11 insertions, 1 deletions
diff --git a/client/src/standalone/videos/embed.html b/client/src/standalone/videos/embed.html
index 908aad940..17029ec41 100644
--- a/client/src/standalone/videos/embed.html
+++ b/client/src/standalone/videos/embed.html
@@ -8,6 +8,7 @@
8 <meta name="robots" content="noindex"> 8 <meta name="robots" content="noindex">
9 <meta property="og:platform" content="PeerTube" /> 9 <meta property="og:platform" content="PeerTube" />
10 10
11 <!-- custom css tag -->
11 <link rel="icon" type="image/png" href="/client/assets/images/favicon.png" /> 12 <link rel="icon" type="image/png" href="/client/assets/images/favicon.png" />
12 </head> 13 </head>
13 14
diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js
index 70141527c..d578443fe 100644
--- a/client/webpack/webpack.video-embed.js
+++ b/client/webpack/webpack.video-embed.js
@@ -122,7 +122,15 @@ module.exports = function () {
122 title: 'PeerTube', 122 title: 'PeerTube',
123 chunksSortMode: 'auto', 123 chunksSortMode: 'auto',
124 inject: 'body', 124 inject: 'body',
125 chunks: ['video-embed'] 125 chunks: ['video-embed'],
126 minify: {
127 collapseWhitespace: true,
128 removeComments: false,
129 removeRedundantAttributes: true,
130 removeScriptTypeAttributes: true,
131 removeStyleLinkTypeAttributes: true,
132 useShortDoctype: true
133 }
126 }), 134 }),
127 135
128 new HtmlWebpackPlugin({ 136 new HtmlWebpackPlugin({
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts
index 43585c591..6a457a711 100644
--- a/server/lib/client-html.ts
+++ b/server/lib/client-html.ts
@@ -210,6 +210,7 @@ class ClientHtml {
210 210
211 let html = buffer.toString() 211 let html = buffer.toString()
212 html = await ClientHtml.addAsyncPluginCSS(html) 212 html = await ClientHtml.addAsyncPluginCSS(html)
213 html = ClientHtml.addCustomCSS(html)
213 214
214 ClientHtml.htmlCache[path] = html 215 ClientHtml.htmlCache[path] = html
215 216