mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-19 12:31:17 +00:00
YouTube is currently A/B testing a new You/Library page that uses RichShelf nodes instead of Shelf. There are no major visual changes, other than the page being much more responsive due to how RichShelf is styled.
20 lines
476 B
TypeScript
20 lines
476 B
TypeScript
import { YTNode } from '../helpers.js';
|
|
import { Parser, type RawNode } from '../index.js';
|
|
|
|
export default class RichSection extends YTNode {
|
|
static type = 'RichSection';
|
|
|
|
public content: YTNode;
|
|
public full_bleed: boolean;
|
|
public target_id?: string;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.content = Parser.parseItem(data.content);
|
|
this.full_bleed = !!data.fullBleed;
|
|
|
|
if ('targetId' in data) {
|
|
this.target_id = data.targetId;
|
|
}
|
|
}
|
|
} |