mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Add changing meta descriptions
This commit is contained in:
parent
deb389fdda
commit
c68a826376
1 changed files with 15 additions and 4 deletions
|
@ -14,10 +14,21 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta
|
|
||||||
name="description"
|
<script>
|
||||||
content="because watching movies legally is boring"
|
const metaTag = document.createElement('meta');
|
||||||
/>
|
let hash = document.location.hash;
|
||||||
|
metaTag.name = 'description';
|
||||||
|
|
||||||
|
if (!hash || ['#/movie', '#/show'].includes(hash)) {
|
||||||
|
metaTag.content = 'because watching movies legally is boring';
|
||||||
|
} else {
|
||||||
|
let components = hash.split('/');
|
||||||
|
metaTag.content = `watch the ${components[1]} "${components[3]}" from ${components[2]} on movie-web`
|
||||||
|
}
|
||||||
|
|
||||||
|
document.getElementsByTagName('head')[0].append(metaTag);
|
||||||
|
</script>
|
||||||
|
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||||
|
|
Loading…
Reference in a new issue