Skip to content

Commit dc0a3e6

Browse files
committed
Add element blocking doc
1 parent 33411e1 commit dc0a3e6

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Here you'll find the semi-technical documentation for most Unclutter features:
88
- [Automatic activation settings](article-detection.md)
99
- [Social highlights](social-highlights.md)
1010
- [Private notes](annotations.md)
11+
- [Element blocking](element-blocking.md)
1112

1213
As well as related topics:
1314

docs/element-blocking.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Element blocking
2+
3+
Because of the wide range of website styling options, Unclutter will not work perfectly on every article.
4+
There are two options for you to make the last 5% of articles more readable:
5+
6+
- For various styling issues, please click the `Report page` button under the "bug" icon in top right of each page. The page will then get fixed within a few days.
7+
- You can immediately remove distracting page elements via the `Block element` button within the same tooltip.
8+
9+
Both options make the extension better for everyone! Reporting a page creates a [GitHub issue](https://github.com/lindylearn/unclutter/issues?q=is%3Aissue+is%3Aclosed+label%3Abroken-website) which I'll try to resolve, and blocking elements creates a [Pull-Request](https://github.com/lindylearn/unclutter/pulls?q=is%3Apr+label%3Abroken-website) with your created selectors.
10+
11+
## Element blocking details
12+
13+
After enabling the element blocking mode via the button in the "bug" popup, simply select the page elements you want to remove.
14+
15+
![](../source/../media/clips/element-blocking.gif)
16+
17+
`Reset` undos all your changes, whereas `Save selectors` from then on applies them to all pages you visit on this website domain. You can exit the element blocking mode by clicking the `Report page` button again or pressing `Esc`.
18+
19+
Internally, Unclutter detects page elements you hover over and iterates up as far as possible in the document tree in [elementPicker.ts](https://github.com/lindylearn/unclutter/blob/main/source/content-script/modifications/elementPicker.ts). Once you click on an element the extension creates a CSS selector based on the element id or classname, and hides everything that matches this selector.
20+
21+
## What elements should be blocked
22+
23+
Ideally everything that isn't part of the article text, page title, metadata such as author name, or images / interactive components that accompany the main text.
24+
25+
Most often, the distractions left over from the automated uncluttering will be empty space, "related articles" sections, advertising interludes inside the text, or overly large site headers. Please feel free to block anything that distracts you from reading.

media/clips/element-blocking.gif

2.33 MB
Loading

0 commit comments

Comments
 (0)