hyvor comments
by Patrick Ludewig
HTML
<script src="https://talk.hyvor.com/embed/embed.js"></script>
<div id="comment-embed">
<hyvor-talk-comments>
</hyvor-talk-comments></div>
JavaScript
customElements.whenDefined('hyvor-talk-comments').then(() => {
const comments = document.createElement("hyvor-talk-comments");
comments.setAttribute("website-id", "8953");
comments.setAttribute('page-id', 'hellworld');
comments.settings = {
name: 'AI Institute', // website name
custom_css: null, // or string of CSS
auth: {
sso_stateless_login_url: null, // or URL string
},
comments_view: {
note: 'This is a note', // note shown above the comments
close_after_days: 0, // close the page after X days (0 for never)
is_keyboard_navigation_on: true,
nested_levels: 3, // number of nested levels (the rest will be collapsed)
},
profiles: {
pictures: false, // show profile pictures
profiles: false, // show profile popup
default_picture: null, // default profile picture URL
display_name_type: 'name', // 'name' | 'username'
},
realtime: {
on: true, // enable realtime updates
count: true, // show online count
users: false, // show online users list
typing: 'off', // show if someone is typing = 'off' | 'on_without_typer' | 'on_with_typer'
},
voting: {
type: 'up', // 'both' | 'up' | 'down'
voters: false, // show voters list
},
top_widget: 'reactions', // 'reactions' | 'ratings' | 'none'
reactions: {
display_type: 'both', // how to display reaction = 'image' | 'text' | 'both'
},
ratings: {
star_color: '#f1c40f', // color of the rating stars
},
text: {
// if a string is set, it will be shown *regardless* of the language.
comment_box: null,
reply_box: null,
no_comments: null,
reactions: null,
ratings: null,
comment_count_0: null,
comment_count_1: null,
comment_count_multi: null,
},
editor: {
emoji: true,
images: false,
gifs: true,
embeds: false, // link embedding
mentions: true,
code_blocks: false,
...