Skip to content

Commit

Permalink
Revert "Close links div when there is no links - #23"
Browse files Browse the repository at this point in the history
  • Loading branch information
dit7ya authored Oct 17, 2021
1 parent ccfd26a commit 80b68d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ browser.runtime.onMessage.addListener(() => {
});
});

const toggleSidebar = (length) => {
const toggleSidebar = () => {
const hnmain = document.getElementById('hnmain');
const linksDiv = document.getElementsByClassName('linksDiv')[0];
if (length === undefined || length === 0 || hnmain.align === 'left') {
if (hnmain.align === 'left') {
linksDiv.style.display = 'none';
hnmain.width = '85%';
hnmain.align = 'center';
Expand Down Expand Up @@ -215,7 +215,7 @@ function createLinksArrayElement (linksArray) {

const linksArray = createLinksArray();
createLinksArrayElement(linksArray);
toggleSidebar(linksArray.length);
toggleSidebar();

// Ellipsify the comment texts to three lines

Expand Down

0 comments on commit 80b68d2

Please sign in to comment.