Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
Ignore hiding shorts elements in notification menu
Browse files Browse the repository at this point in the history
  • Loading branch information
probablyraging committed Feb 2, 2023
1 parent 48dcdaa commit 33acda1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/scripts/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function hideShorts() {
if (selector === '[href^="/shorts/"]') {
const shorts = document.querySelectorAll('[href^="/shorts/"]');
shorts.forEach(short => {
if (short.parentNode.id === 'item' || short.parentNode.parentNode.parentNode.parentNode.parentNode.id === 'submenu') return;
short.parentNode.parentNode.parentNode.style.display = 'none';
});
}
Expand All @@ -56,9 +57,7 @@ function hideShorts() {
function removeParentNodes(element, n) {
for (let i = 0; i < n; i++) {
element = element.parentNode;
if (!element) {
return;
}
if (!element || element.parentNode.id === 'item' || element.parentNode.parentNode.parentNode.parentNode.parentNode.id === 'submenu') return;
}
element.parentNode.removeChild(element);
}
Expand Down
3 changes: 2 additions & 1 deletion src/stylesheets/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ a:hover {
height: 12px;
border-radius: 34px;
background-color: #555;
cursor: pointer;
}

.toggle-container:hover .toggle-button {
Expand All @@ -96,6 +97,7 @@ a:hover {
border-radius: 30px;
border: none;
transition: all 0.2s ease;
cursor: pointer;
}

.toggle-container:before {
Expand Down Expand Up @@ -202,7 +204,6 @@ a:hover {
.tooltip {
position: relative;
display: inline-block;
cursor: pointer;
}

.tooltip::before {
Expand Down

0 comments on commit 33acda1

Please sign in to comment.