mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-29 09:37:26 +00:00
* feat(Channel): Support new about popup * chore: Minor cleanup * fix(concatMemos): Merge duplicate nodes instead of overwriting * fix(Feed): `has_continuation` and `getContinuation()` avoid header continuations * chore(Channel): Remove unused import --------- Co-authored-by: LuanRT <luan.lrt4@gmail.com>
20 lines
604 B
TypeScript
20 lines
604 B
TypeScript
import { YTNode } from '../helpers.js';
|
|
import type { RawNode } from '../index.js';
|
|
import Text from './misc/Text.js';
|
|
import Thumbnail from './misc/Thumbnail.js';
|
|
|
|
export default class ChannelExternalLinkView extends YTNode {
|
|
static type = 'ChannelExternalLinkView';
|
|
|
|
title: Text;
|
|
link: Text;
|
|
favicon: Thumbnail[];
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
|
|
this.title = Text.fromAttributed(data.title);
|
|
this.link = Text.fromAttributed(data.link);
|
|
this.favicon = data.favicon.sources.map((x: any) => new Thumbnail(x)).sort((a: Thumbnail, b: Thumbnail) => b.width - a.width);
|
|
}
|
|
} |