Skip to content

Commit

Permalink
添加og:description并更新版本
Browse files Browse the repository at this point in the history
  • Loading branch information
Meekdai committed Apr 9, 2024
1 parent 76e124e commit 9b13aee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<link rel="icon" href="https://static.meekdai.com/favicon.svg">
<title>Gmemp</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Meekdai/Gmemp@v3.1/docs/player.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Meekdai/Gmemp@v3.2/docs/player.css">
<!-- <link rel="stylesheet" href="./player.css"> -->
</head>
<body>
Expand Down Expand Up @@ -53,7 +53,7 @@
</div>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/howler.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/Meekdai/Gmemp@v3.1/docs/player.js"></script>
<script src="https://cdn.jsdelivr.net/gh/Meekdai/Gmemp@v3.2/docs/player.js"></script>
<!-- <script src="./player.js"></script> -->
</body>
</html>
1 change: 1 addition & 0 deletions docs/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ Player.prototype = {
window.location.hash="#"+(index);

document.querySelector('meta[property="og:title"]').setAttribute('content', data.title);
document.querySelector('meta[property="og:description"]').setAttribute('content', data.article);
document.querySelector('meta[property="og:url"]').setAttribute('content', window.location.href);
document.querySelector('meta[property="og:image"]').setAttribute('content', media+ encodeURI(data.pic));

Expand Down

0 comments on commit 9b13aee

Please sign in to comment.