Skip to content

Commit 25ad997

Browse files
committed
fix: resolve relative path fetch issue in Firefox
1 parent 4274358 commit 25ad997

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/entrypoints/play-all-button.content/youtube-api.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ async function getOldestItemId(
3030
channelId: string,
3131
categoryKind: CategoryKind,
3232
): Promise<string | null> {
33-
const playlistUrl = `${resolveFilteredPlaylistUrl(channelId, categoryKind, "Latest")}`;
33+
const playlistUrl = new URL(
34+
`${resolveFilteredPlaylistUrl(channelId, categoryKind, "Latest")}`,
35+
window.location.href,
36+
).toString();
3437

3538
const playlistHeader = (await fetchYtInitialData(playlistUrl)).header;
3639
if (playlistHeader === undefined) {

0 commit comments

Comments
 (0)