Skip to content

Commit

Permalink
Merge pull request #29 from dideler/fix#2/showmore-style-margin
Browse files Browse the repository at this point in the history
🐛 Fix problem: incorrect spacing between 'SHOW MORE' & 'SHOW LESS' button.
  • Loading branch information
1natsu172 authored Feb 3, 2018
2 parents 0497a5f + d65e988 commit bd7987e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,8 @@ const newYouTube = {
_addButton() {
debugLog('ADDING BUTTON...');
const moreButton = document.getElementById('more');
const style = moreButton.hidden ? 'style="margin-left:0"' : '';
const button = `
<button class="fake-paper-button" id="toggle-comments" ${style} type="button">
<button class="fake-paper-button" id="toggle-comments" type="button">
<div class="fake-yt-formatted-string">
<span id="toggle-comments-label">${globals.showComments}</span>
&nbsp;<span id="comments-count"></span>
Expand Down
7 changes: 6 additions & 1 deletion youtube.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}

.is-hide {
display: none
display: none;
}

.fake-paper-button {
Expand Down Expand Up @@ -34,6 +34,11 @@
text-transform: var(--paper-button_-_text-transform, uppercase);
}

/* Behavior when there is no "SHOW MORE/LESS" button */
#less[hidden] + #more[hidden] + .fake-paper-button {
margin-left: 0;
}

.fake-yt-formatted-string {
color: var(--yt-expand-color);
display: inline-block;
Expand Down

0 comments on commit bd7987e

Please sign in to comment.