Make highlight larger on preview bar

This commit is contained in:
Ajay Ramachandran
2021-08-17 18:37:59 -04:00
parent 4e99754b8c
commit 42beaf698c
2 changed files with 5 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ export interface PreviewBarSegment {
segment: [number, number];
category: string;
unsubmitted: boolean;
showLarger: boolean;
}
class PreviewBar {
@@ -182,10 +183,10 @@ class PreviewBar {
});
}
createBar({category, unsubmitted, segment}: PreviewBarSegment): HTMLLIElement {
createBar({category, unsubmitted, segment, showLarger}: PreviewBarSegment): HTMLLIElement {
const bar = document.createElement('li');
bar.classList.add('previewbar');
bar.innerHTML = ' ';
bar.innerHTML = showLarger ? '  ' : ' ';
const fullCategoryName = (unsubmitted ? 'preview-' : '') + category;
bar.setAttribute('sponsorblock-category', fullCategoryName);