Skip to content

Commit

Permalink
feat: hide toc-bar in print mode, close #7
Browse files Browse the repository at this point in the history
  • Loading branch information
hikerpig committed Oct 30, 2021
1 parent 6499839 commit 7b3b149
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion toc-bar.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@ a.toc-link {
.is-active-link::before {
background-color: var(--toc-bar-active-color);
}
@media print {
.toc-bar__no-print { display: none !important; }
}
/* end tocbot related */
`

Expand All @@ -464,7 +468,7 @@ a.toc-link {

this.element = document.createElement('div')
this.element.id = 'toc-bar'
this.element.classList.add('toc-bar')
this.element.classList.add('toc-bar', 'toc-bar__no-print')
document.body.appendChild(this.element)

/** @type {Boolean} */
Expand Down

0 comments on commit 7b3b149

Please sign in to comment.