Skip to content

Commit 61a1639

Browse files
committed
Merge branch 'main' into end-poll
2 parents b5560cf + f4edf9d commit 61a1639

File tree

6 files changed

+46
-3
lines changed

6 files changed

+46
-3
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"start:chrome": "cross-env AUTOLAUNCH=true npm run dev:chrome",
1212
"start:firefox": "cross-env AUTOLAUNCH=true npm run dev:firefox",
1313
"lint": "npm run lint:check -- --fix",
14-
"lint:check": "eslint src --max-warnings=0"
14+
"lint:check": "eslint src --max-warnings=0",
15+
"postinstall": "patch-package"
1516
},
1617
"dependencies": {
1718
"@livetl/svelte-webext-stores": "^0.0.14",
@@ -33,6 +34,7 @@
3334
"eslint-config-standard-with-typescript": "^43.0.1",
3435
"eslint-plugin-svelte3": "^3.2.0",
3536
"npm-run-all": "^4.1.5",
37+
"patch-package": "^8.0.0",
3638
"postcss": "^8.4.31",
3739
"postcss-extend": "^1.0.5",
3840
"postcss-import": "^14.0.2",
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/node_modules/vite-plugin-web-extension/dist/index.cjs b/node_modules/vite-plugin-web-extension/dist/index.cjs
2+
index e02db3b..287502e 100644
3+
--- a/node_modules/vite-plugin-web-extension/dist/index.cjs
4+
+++ b/node_modules/vite-plugin-web-extension/dist/index.cjs
5+
@@ -125,7 +125,7 @@ function resolveBrowserTagsInObject(browser, object) {
6+
// src/validation.ts
7+
var import_ajv = __toModule(require("ajv"));
8+
var import_https = __toModule(require("https"));
9+
-var SCHEMA_URL = "https://json.schemastore.org/chrome-manifest";
10+
+var SCHEMA_URL = "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/chrome-manifest.json";
11+
async function validateManifest(log, manifest) {
12+
const ajv = new import_ajv.default();
13+
ajv.addFormat("permission", /.*/);
14+
diff --git a/node_modules/vite-plugin-web-extension/dist/index.js b/node_modules/vite-plugin-web-extension/dist/index.js
15+
index 21e6808..d4f9341 100644
16+
--- a/node_modules/vite-plugin-web-extension/dist/index.js
17+
+++ b/node_modules/vite-plugin-web-extension/dist/index.js
18+
@@ -115,7 +115,7 @@ function resolveBrowserTagsInObject(browser, object) {
19+
// src/validation.ts
20+
import Ajv from "ajv";
21+
import https from "https";
22+
-var SCHEMA_URL = "https://json.schemastore.org/chrome-manifest";
23+
+var SCHEMA_URL = "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/chrome-manifest.json";
24+
async function validateManifest(log, manifest) {
25+
const ajv = new Ajv();
26+
ajv.addFormat("permission", /.*/);

src/components/ChatSummary.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import Icon from 'smelte/src/components/Icon';
66
import { Theme } from '../ts/chat-constants';
77
import { createEventDispatcher } from 'svelte';
8+
import { showTimestamps } from '../ts/storage';
89
910
export let summary: Ytc.ParsedSummary;
1011
@@ -55,6 +56,11 @@
5556
<span class="align-middle">{run.text}</span>
5657
{/if}
5758
{/each}
59+
{#if summary.timestamp && $showTimestamps}
60+
<span class="text-xs ml-1 text-gray-400 dark:text-gray-600 align-middle">
61+
{summary.timestamp}
62+
</span>
63+
{/if}
5864
</div>
5965
<div class="flex-none self-end" style="transform: translateY(3px);">
6066
<Tooltip offsetY={0} small>

src/components/RedirectBanner.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
import { slide, fade } from 'svelte/transition';
33
import MessageRun from './MessageRuns.svelte';
44
import Tooltip from './common/Tooltip.svelte';
5+
import Button from 'smelte/src/components/Button';
56
import Icon from 'smelte/src/components/Icon';
67
import { Theme } from '../ts/chat-constants';
78
import { createEventDispatcher } from 'svelte';
8-
import { showProfileIcons } from '../ts/storage';
9-
import Button from 'smelte/src/components/Button';
9+
import { showProfileIcons, showTimestamps } from '../ts/storage';
1010
1111
export let redirect: Ytc.ParsedRedirect;
1212
@@ -53,6 +53,11 @@
5353
</Icon>
5454
</span>
5555
<span class="align-middle">Live Redirect Notice</span>
56+
{#if redirect.timestamp && $showTimestamps}
57+
<span class="text-xs ml-1 text-gray-400 dark:text-gray-600 align-middle">
58+
{redirect.timestamp}
59+
</span>
60+
{/if}
5661
</div>
5762
<div class="flex-none self-end" style="transform: translateY(3px);">
5863
<Tooltip offsetY={0} small>

src/ts/chat-parser.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ const parseChatSummary = (renderer: Ytc.AddChatItem, actionId: string, showtime:
104104
message: splitRuns[2],
105105
},
106106
showtime: showtime,
107+
timestamp: formatTimestamp(Date.now() * 1000),
107108
};
108109
return item;
109110
}
@@ -139,6 +140,7 @@ const parseRedirectBanner = (renderer: Ytc.AddChatItem, actionId: string, showti
139140
}
140141
},
141142
showtime: showtime,
143+
timestamp: formatTimestamp(Date.now() * 1000),
142144
};
143145
return item;
144146
}

src/ts/typings/ytc.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ declare namespace Ytc {
491491
message: ParsedRun[];
492492
};
493493
showtime: number;
494+
timestamp?: string;
494495
}
495496

496497
interface ParsedRedirect {
@@ -505,6 +506,7 @@ declare namespace Ytc {
505506
}
506507
};
507508
showtime: number;
509+
timestamp?: string;
508510
}
509511

510512
interface ParsedPoll {

0 commit comments

Comments
 (0)