Skip to content

Commit

Permalink
add noview, restructure gendocs for consistent links
Browse files Browse the repository at this point in the history
  • Loading branch information
mchangrh committed Apr 13, 2024
1 parent 08287fb commit 60fdbfb
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 14 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@ Serverless Redirect: `https://neuter.mchang.xyz/filter`
### SponsorBlock sub-list
Less aggressive in elements to block

[add to uBo](https://subscribe.adblockplus.org/?location=https://neuter.mchang.xyz/filters/sponsorblock&title=yt-neuter%20sponsorblock)
[add to uBo](https://subscribe.adblockplus.org/?location=https://neuter.mchang.xyz/filter/sponsorblock&title=yt-neuter%20sponsorblock)

Filter URLs
GitHub: `https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/sponsorblock.txt`
Serverless Redirect: `https://neuter.mchang.xyz/filter/sponsorblock`

### noview
Hide force-pushed low-view videos

[add to uBo](https://subscribe.adblockplus.org/?location=https://neuter.mchang.xyz/filter/noview&title=YouTube%20Neuter%20noview)

Filter URLs
GitHub: `https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/noview.txt`
Serverless Redirect: `https://neuter.mchang.xyz/filter/noview`

## Userscripts
- Disable recommended and playlist AutoPlay [Install](https://neuter.mchang.xyz/script/yt-no-autoplay.user.js)
- Change "Subscribe" background to blend in with the rest of the theme [Install](https://neuter.mchang.xyz/script/mute-subscribe.user.js)
Expand Down
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ Extremely aggressive misc filters
Conservative subset of yt-neuter for SponsorBlock (PRs require additional scrutiny)
[docs](./filters/sponsorblock.md) | [add to uBo](https://subscribe.adblockplus.org/?location=https://neuter.mchang.xyz/filter/sponsorblock&title=YouTube%20Neuter%20-%20SponsorBlock)

## noview
Hide forced low-view videos from browse feeds
[docs](./filters/noview.md) | [add to uBo](https://subscribe.adblockplus.org/?location=https://neuter.mchang.xyz/filter/noview&title=YouTube%20Neuter%20-%20noview)

## requests
niche transformative filters requested

Expand Down
2 changes: 1 addition & 1 deletion docs/filters/misc.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Ffilters%2Fmisc.txt&title=yt-neuter%20misc) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/misc.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Fmisc&title=yt-neuter%20misc) | [View List](https://neuter.mchang.xyz/filter/misc)

## network requests
* remove offline service worker
Expand Down
2 changes: 1 addition & 1 deletion docs/filters/nolive.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Ffilters%2Fnolive.txt&title=yt-neuter%20nolive) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/nolive.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Fnolive&title=yt-neuter%20nolive) | [View List](https://neuter.mchang.xyz/filter/nolive)

## global elements
### sidebar navigation
Expand Down
2 changes: 1 addition & 1 deletion docs/filters/nomusic.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Ffilters%2Fnomusic.txt&title=yt-neuter%20nomusic) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/nomusic.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Fnomusic&title=yt-neuter%20nomusic) | [View List](https://neuter.mchang.xyz/filter/nomusic)

## global elements
### sidebar navigation
Expand Down
2 changes: 1 addition & 1 deletion docs/filters/noshorts.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Ffilters%2Fnoshorts.txt&title=yt-neuter%20noshorts) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/noshorts.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Fnoshorts&title=yt-neuter%20noshorts) | [View List](https://neuter.mchang.xyz/filter/noshorts)

## generics
* shelves
Expand Down
2 changes: 1 addition & 1 deletion docs/filters/notrack.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Ffilters%2Fnotrack.txt&title=yt-neuter%20notrack) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/notrack.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Fnotrack&title=yt-neuter%20notrack) | [View List](https://neuter.mchang.xyz/filter/notrack)

## network requests
* quality of experience
Expand Down
6 changes: 6 additions & 0 deletions docs/filters/noview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Fnoview&title=yt-neuter%20noview) | [View List](https://neuter.mchang.xyz/filter/noview)

## video browsing
* remove forced low view count videos [#62](https://github.com/mchangrh/yt-neuter/issues/62)
2 changes: 1 addition & 1 deletion docs/filters/premium.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Ffilters%2Fpremium.txt&title=yt-neuter%20premium) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/premium.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Fpremium&title=yt-neuter%20premium) | [View List](https://neuter.mchang.xyz/filter/premium)

## video browsing
* 3-dot dropdown ([#38](https://github.com/mchangrh/yt-neuter/issues/38))
Expand Down
2 changes: 1 addition & 1 deletion docs/filters/requests.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Ffilters%2Frequests.txt&title=yt-neuter%20requests) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/requests.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Frequests&title=yt-neuter%20requests) | [View List](https://neuter.mchang.xyz/filter/requests)

## /video
### in-player
Expand Down
2 changes: 1 addition & 1 deletion docs/filters/sponsorblock.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Subset of yt-neuter for sponsorblock
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Ffilters%2Fsponsorblock.txt&title=yt-neuter%20sponsorblock) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/sponsorblock.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Fsponsorblock&title=yt-neuter%20sponsorblock) | [View List](https://neuter.mchang.xyz/filter/sponsorblock)

## global elements
### popups
Expand Down
2 changes: 1 addition & 1 deletion docs/filters/ytkids.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### yt-neuter for yt kids
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Ffilters%2Fytkids.txt&title=yt-neuter%20ytkids) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/filters/ytkids.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Ffilter%2Fytkids&title=yt-neuter%20ytkids) | [View List](https://neuter.mchang.xyz/filter/ytkids)

## /video
### metadata
Expand Down
8 changes: 5 additions & 3 deletions docs/gendocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ const { readFileSync, writeFileSync } = require('fs')
const getName = (filter) =>
filter == 'yt-neuter'
? filter
: `yt-neuter ${filter.replace('filters/', '')}`
: `yt-neuter ${filter.replace('filter/', '')}`

function generateInstallLink(filter) {
const listURL = `https://raw.githubusercontent.com/mchangrh/yt-neuter/main/${filter}.txt`
filter = filter.replace('filters/', 'filter/')
const listURL = `https://neuter.mchang.xyz/${filter}`
const installURL = `https://subscribe.adblockplus.org/?location=${encodeURIComponent(listURL)}&title=${encodeURIComponent(getName(filter))}`
return `# Install\n\n[Subscribe](${installURL}) | [View List](${listURL})\n`
}
Expand Down Expand Up @@ -38,10 +39,11 @@ const filters = [
"filters/nomusic",
"filters/noshorts",
"filters/notrack",
"filters/noview",
"filters/premium",
"filters/requests",
"filters/sponsorblock",
"filters/ytkids",
"filters/ytkids"
]

for (const filter of filters) {
Expand Down
2 changes: 1 addition & 1 deletion docs/yt-neuter.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Install

[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fraw.githubusercontent.com%2Fmchangrh%2Fyt-neuter%2Fmain%2Fyt-neuter.txt&title=yt-neuter) | [View List](https://raw.githubusercontent.com/mchangrh/yt-neuter/main/yt-neuter.txt)
[Subscribe](https://subscribe.adblockplus.org/?location=https%3A%2F%2Fneuter.mchang.xyz%2Fyt-neuter&title=yt-neuter) | [View List](https://neuter.mchang.xyz/yt-neuter)

## generics
* shelves
Expand Down
13 changes: 13 additions & 0 deletions filters/noview.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[uBlock Origin]
! Title: YouTube Neuter - noview
! Last modified: 2024/02/04
! Expires: 10 days
! Homepage: https://github.com/mchangrh/yt-neuter
! Licence: Unlicense
!

! install link

!!!! video browsing
! remove forced low view count videos #62
youtube.com##ytd-compact-video-renderer:has(.secondary-metadata:has(>ytd-video-meta-block.byline-separated):has(.badge:has(>:has-text(New))))

0 comments on commit 60fdbfb

Please sign in to comment.