Skip to content

Commit

Permalink
Fix info element not being hidden
Browse files Browse the repository at this point in the history
It was selecting the wrong element due to id attributes not being unique.

Resolves #8
  • Loading branch information
ZimbiX committed Sep 23, 2021
1 parent 2a1ee0b commit 1a1a0dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extension/contentScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
const fluff = ['#secondary-inner', '#info', '#meta', '#comments', '#masthead-container', '#speedyg']

const setFluffDisplay = (value) => {
fluff.forEach(sel => { document.querySelector(sel).style.display = value })
fluff.forEach(selector => {
document.querySelectorAll(selector).forEach(el => {
el.style.display = value
})
})
}

const hideFluff = () => {
Expand Down

0 comments on commit 1a1a0dc

Please sign in to comment.