Skip to content

Commit

Permalink
fix discord video embed
Browse files Browse the repository at this point in the history
  • Loading branch information
Kathund committed Feb 8, 2024
1 parent da029ad commit 7d84380
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sharex-api",
"description": "",
"version": "1.2.0",
"version": "1.2.1",
"main": "index.ts",
"scripts": {
"start": "npx tsx index.ts",
Expand Down
26 changes: 9 additions & 17 deletions src/views/pages/file.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ShareX-API | <%= data.name %>.<%= data.fileExtension %>
</title>
<title>ShareX-API | <%= data.name %>.<%= data.fileExtension %></title>
<link rel="icon" type="image/x-icon" href="../files/favicon.ico">
<meta name="twitter:card" content="summary_large_image" />
<meta property="og:image" content="<%= img %>" />
Expand All @@ -14,12 +13,10 @@
<meta property="og:site_name" content="">
<meta name="robots" content="noindex">
<meta charset="UTF-8">

<% if (img.endsWith('.mp4')) { %>
<meta name="twitter:player" content="video url">
<% } else { %>
<meta property="og:image" content="<%= img %>" />
<% } %>
<meta name="twitter:player" content="<%= img %>"><%
} else { %>
<meta property="og:image" content="<%= img %>" /><% } %>
</head>

<body>
Expand All @@ -33,20 +30,15 @@
<img src="<%= img %>" alt="Image">
<% } %>
<div class="text">
<p>Name - <%= data.name %>
</p>
<p>Name - <%= data.name %></p>
<div class="tooltip">
<p>Time - <%= getTime(data.timestamp.unix, Intl.DateTimeFormat().resolvedOptions().timeZone) %>
</p>
<span class="tooltiptext">UTC - <%= data.timestamp.utc %></span>
<p>Time - <%= getTime(data.timestamp.unix, Intl.DateTimeFormat().resolvedOptions().timeZone) %></p><span class="tooltiptext">UTC - <%= data.timestamp.utc %></span>
</div>
<p>Date - <%= getDate(data.timestamp.unix, Intl.DateTimeFormat().resolvedOptions().timeZone) %>
</p>
<p>Size - <%= data.size.dynamic %>
</p>
<p>Date - <%= getDate(data.timestamp.unix, Intl.DateTimeFormat().resolvedOptions().timeZone) %></p>
<p>Size - <%= data.size.dynamic %></p>
</div>
</div>
</main>
</body>

</html>
<>

0 comments on commit 7d84380

Please sign in to comment.