Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Fix scrollbar option for Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
lassekongo83 committed Mar 15, 2021
1 parent c2fa372 commit 5b46135
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/js/contentScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ function makeRoom() {
// Option to restore browser default scrollbar
function restoreScrollbar() {
document.body.removeAttribute('themed-scrollbar');
// For Firefox
document.querySelector('html').removeAttribute('themed-scrollbar');
Element.prototype.removeAttributes = function(...attrs) {
attrs.forEach(attr => this.removeAttribute(attr));
}
document.querySelector('ytd-app').removeAttributes('scrollbar-rework', 'scrollbar-color');
}

// Apply settings
Expand Down

0 comments on commit 5b46135

Please sign in to comment.