mirror of
https://github.com/LBRYFoundation/Watch-on-LBRY.git
synced 2025-08-23 17:47:26 +00:00
commit
9a9b51bbba
5 changed files with 8 additions and 6 deletions
|
@ -6,7 +6,7 @@ export interface LbrySettings {
|
|||
export const DEFAULT_SETTINGS: LbrySettings = { enabled: true, redirect: 'lbry.tv' };
|
||||
|
||||
export const redirectDomains = {
|
||||
'lbry.tv': { prefix: 'https://lbry.tv/', display: 'lbry.tv' },
|
||||
'madiator.com': { prefix: 'https://madiator.com/', display: 'madiator.com' },
|
||||
odysee: { prefix: 'https://odysee.com/', display: 'odysee' },
|
||||
app: { prefix: 'lbry://', display: 'App' },
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@ import chunk from 'lodash/chunk';
|
|||
import groupBy from 'lodash/groupBy';
|
||||
import pickBy from 'lodash/pickBy';
|
||||
|
||||
const LBRY_API_HOST = 'https://api.lbry.com';
|
||||
const LBRY_API_HOST = 'https://api.odysee.com';
|
||||
const QUERY_CHUNK_SIZE = 300;
|
||||
|
||||
interface YtResolverResponse {
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{
|
||||
"name": "Watch on LBRY",
|
||||
"version": "1.7.2",
|
||||
"version": "1.7.3",
|
||||
"permissions": [
|
||||
"https://www.youtube.com/",
|
||||
"https://invidio.us/channel/*",
|
||||
"https://invidio.us/watch?v=*",
|
||||
"https://api.lbry.com/*",
|
||||
"https://api.odysee.com/*",
|
||||
"https://lbry.tv/*",
|
||||
"https://odysee.com/*",
|
||||
"https://madiator.com/*",
|
||||
"tabs",
|
||||
"storage"
|
||||
],
|
||||
|
|
|
@ -35,7 +35,7 @@ async function ctxFromURL(url: string): Promise<UpdateContext | void> {
|
|||
// handles lbry.tv -> lbry app redirect
|
||||
chrome.tabs.onUpdated.addListener(async (tabId, changeInfo, { url: tabUrl }) => {
|
||||
const { enabled, redirect } = await getSettingsAsync('enabled', 'redirect');
|
||||
if (!enabled || redirect !== 'app' || !changeInfo.url || !tabUrl?.startsWith('https://lbry.tv/')) return;
|
||||
if (!enabled || redirect !== 'app' || !changeInfo.url || !tabUrl?.startsWith('https://odysee.com/')) return;
|
||||
|
||||
const url = appRedirectUrl(tabUrl, { encode: true });
|
||||
if (!url) return;
|
||||
|
|
|
@ -20,7 +20,7 @@ interface ButtonSettings {
|
|||
|
||||
const buttonSettings: Record<LbrySettings['redirect'], ButtonSettings> = {
|
||||
app: { text: 'Watch on LBRY', icon: chrome.runtime.getURL('icons/lbry/lbry-logo.svg') },
|
||||
'lbry.tv': { text: 'Watch on LBRY', icon: chrome.runtime.getURL('icons/lbry/lbry-logo.svg') },
|
||||
'madiator.com': { text: 'Watch on LBRY', icon: chrome.runtime.getURL('icons/lbry/lbry-logo.svg') },
|
||||
odysee: {
|
||||
text: 'Watch on Odysee', icon: chrome.runtime.getURL('icons/lbry/odysee-logo.svg'),
|
||||
style: { backgroundColor: '#1e013b' },
|
||||
|
|
Loading…
Add table
Reference in a new issue