mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
Update button on redirect change
This commit is contained in:
parent
7954c29482
commit
2e58a04333
2 changed files with 6 additions and 1 deletions
|
@ -89,7 +89,7 @@ export const ytService = {
|
|||
video_ids: groups['video']?.map(s => s.id).join(','),
|
||||
channel_ids: groups['channel']?.map(s => s.id).join(','),
|
||||
}));
|
||||
return fetch(`${LBRY_API_HOST}/yt/resolve?${params}`)
|
||||
return fetch(`${LBRY_API_HOST}/yt/resolve?${params}`, {cache: 'force-cache'})
|
||||
.then(rsp => rsp.ok ? rsp.json() : null);
|
||||
}));
|
||||
|
||||
|
|
|
@ -106,3 +106,8 @@ chrome.runtime.onMessage.addListener(async (req: { url: string }) => {
|
|||
if (!req.url) return;
|
||||
handle(new URL(req.url));
|
||||
});
|
||||
|
||||
chrome.storage.onChanged.addListener((changes, areaName) => {
|
||||
if (areaName !== 'local' || !changes.redirect) return;
|
||||
handle(new URL(location.href))
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue