Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
brokiem committed Jan 14, 2023
1 parent 152d29c commit d5b7b3c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Anime Discovery</title>
<meta name="description" content="Discover your favorite anime with brokiem's Anime Discovery">
<meta name="keywords" content="anime, manga, discovery, brokiem, anime discovery, anime discovery brokiem, myanimelist">

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
Expand All @@ -14,6 +15,8 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="theme-color" content="#181818">

<link rel="preconnect" href="https://cdn.myanimelist.net" crossorigin="anonymous"/>

<meta name="google-site-verification" content="avMYpzcNq1BU9InVUzT3RoBfxWCO68LgKJrq7ZWqqbE" />
</head>
<body>
Expand Down
6 changes: 6 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@ const store = createStore({
},
mutations: {
setLoading(state, payload) {
window.document.title = "Anime Discovery";

state.loading = payload;
},
setAnime(state, payload) {
payload.synopsis = payload.synopsis.replaceAll('[Written by MAL Rewrite]', '').replace(/\n+$/, '').replaceAll('\n', '<br>')

state.anime = payload;

const englishTitle = payload.englishTitle.length > 0 ? `(${payload.englishTitle})` : '';
window.document.title = `${payload.title} ${englishTitle} | Anime Discovery`;
document.querySelector('meta[name="description"]')?.setAttribute("content", payload.synopsis);
},
setHasScrollbar(state, payload) {
state.hasScrollbar = payload;
Expand Down

0 comments on commit d5b7b3c

Please sign in to comment.