mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-26 16:18:51 +00:00
refactor!: finish parser migration
Finally! :) This removes all code related to the old parser. #65
This commit is contained in:
25
lib/parser/classes/comments/AuthorCommentBadge.js
Normal file
25
lib/parser/classes/comments/AuthorCommentBadge.js
Normal file
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
class AuthorCommentBadge {
|
||||
type = 'AuthorCommentBadge';
|
||||
|
||||
#data;
|
||||
|
||||
constructor(data) {
|
||||
this.icon_type = data.icon.iconType;
|
||||
this.tooltip = data.iconTooltip;
|
||||
|
||||
// *** For consistency
|
||||
this.tooltip === 'Verified' &&
|
||||
(this.style = 'BADGE_STYLE_TYPE_VERIFIED') &&
|
||||
(data.style = 'BADGE_STYLE_TYPE_VERIFIED');
|
||||
|
||||
this.#data = data;
|
||||
}
|
||||
|
||||
get orig_badge() {
|
||||
return this.#data;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AuthorCommentBadge;
|
||||
Reference in New Issue
Block a user