1
mirror of https://github.com/revanced/revanced-integrations synced 2025-11-19 03:23:27 +01:00

Compare commits

...

50 Commits

Author SHA1 Message Date
semantic-release-bot
e9947fd66a chore(release): 0.111.2-dev.2 [skip ci]
## [0.111.2-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.111.2-dev.1...v0.111.2-dev.2) (2023-07-03)

### Bug Fixes

* **reddit/sanitize-sharing-links:** update patch to support latest app version ([#430](https://github.com/revanced/revanced-integrations/issues/430)) ([d947de2](d947de2e03))
2023-07-03 19:30:58 +00:00
LisoUseInAIKyrios
d947de2e03 fix(reddit/sanitize-sharing-links): update patch to support latest app version (#430) 2023-07-03 23:29:04 +04:00
semantic-release-bot
e9f797824e chore(release): 0.111.2-dev.1 [skip ci]
## [0.111.2-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.111.1...v0.111.2-dev.1) (2023-07-02)

### Bug Fixes

* **youtube/spoof-signature-verification:** remove auto re-enable functionality ([#428](https://github.com/revanced/revanced-integrations/issues/428)) ([8afe82c](8afe82c0e0))
2023-07-02 08:27:45 +00:00
LisoUseInAIKyrios
8afe82c0e0 fix(youtube/spoof-signature-verification): remove auto re-enable functionality (#428) 2023-07-02 12:25:51 +04:00
semantic-release-bot
bb9120ebae chore(release): 0.111.1 [skip ci]
## [0.111.1](https://github.com/revanced/revanced-integrations/compare/v0.111.0...v0.111.1) (2023-07-01)

### Bug Fixes

* **youtube/client-spoof:** update settings text for known side effects of spoof signature  ([#424](https://github.com/revanced/revanced-integrations/issues/424)) ([d7a3973](d7a3973ef1))
* **youtube/disable-fullscreen-panels:** prompt to restart after turning on/off ([#426](https://github.com/revanced/revanced-integrations/issues/426)) ([328ecff](328ecff18b))

### Performance Improvements

* return earlier when possible ([#427](https://github.com/revanced/revanced-integrations/issues/427)) ([12f3f97](12f3f97552))
2023-07-01 00:39:21 +00:00
oSumAtrIX
bc91b35994 chore: merge branch dev to main (#425) 2023-07-01 02:36:52 +02:00
semantic-release-bot
f3f8026c1e chore(release): 0.111.1-dev.3 [skip ci]
## [0.111.1-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.111.1-dev.2...v0.111.1-dev.3) (2023-06-27)

### Performance Improvements

* return earlier when possible ([#427](https://github.com/revanced/revanced-integrations/issues/427)) ([12f3f97](12f3f97552))
2023-06-27 01:30:40 +00:00
Jim Man
12f3f97552 perf: return earlier when possible (#427) 2023-06-27 03:28:29 +02:00
semantic-release-bot
b4c0619abb chore(release): 0.111.1-dev.2 [skip ci]
## [0.111.1-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.111.1-dev.1...v0.111.1-dev.2) (2023-06-25)

### Bug Fixes

* **youtube/disable-fullscreen-panels:** prompt to restart after turning on/off ([#426](https://github.com/revanced/revanced-integrations/issues/426)) ([328ecff](328ecff18b))
2023-06-25 18:52:48 +00:00
LisoUseInAIKyrios
328ecff18b fix(youtube/disable-fullscreen-panels): prompt to restart after turning on/off (#426) 2023-06-25 22:50:39 +04:00
semantic-release-bot
40c07769e2 chore(release): 0.111.1-dev.1 [skip ci]
## [0.111.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.111.0...v0.111.1-dev.1) (2023-06-23)

### Bug Fixes

* **youtube/client-spoof:** update settings text for known side effects of spoof signature  ([#424](https://github.com/revanced/revanced-integrations/issues/424)) ([d7a3973](d7a3973ef1))
2023-06-23 13:47:50 +00:00
LisoUseInAIKyrios
d7a3973ef1 fix(youtube/client-spoof): update settings text for known side effects of spoof signature (#424) 2023-06-23 17:45:47 +04:00
semantic-release-bot
db9b0e312d chore(release): 0.111.0 [skip ci]
# [0.111.0](https://github.com/revanced/revanced-integrations/compare/v0.110.0...v0.111.0) (2023-06-21)

### Bug Fixes

* don't include all Litho patches, when not included ([9952581](9952581a32))
* **reddit/hide-ads:** only filter promoted links ([efc2b9b](efc2b9b6a3))
* **youtube/client-spoof:** use new visitor data to work around playback issues ([be9c948](be9c948ce6))
* **youtube/hide-layout-components:** preserve gap when hiding expandable chips ([b47a214](b47a214067))
* **youtube:** separate `hide-ads` to `hide-layout-components` patch ([bdce029](bdce0298c4))

### Features

* **youtube/hide-layout-components:** separate hiding expandable chips and chapters ([80fb3a3](80fb3a31dd))
2023-06-21 23:31:43 +00:00
oSumAtrIX
190481cb39 chore: merge branch dev to main (#421) 2023-06-22 01:29:48 +02:00
semantic-release-bot
4f4a096318 chore(release): 0.111.0-dev.3 [skip ci]
# [0.111.0-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.111.0-dev.2...v0.111.0-dev.3) (2023-06-21)

### Bug Fixes

* **youtube/client-spoof:** use new visitor data to work around playback issues ([be9c948](be9c948ce6))
2023-06-21 23:26:58 +00:00
oSumAtrIX
be9c948ce6 fix(youtube/client-spoof): use new visitor data to work around playback issues
See 81ca451480
2023-06-22 01:13:14 +02:00
semantic-release-bot
4f66d05573 chore(release): 0.111.0-dev.2 [skip ci]
# [0.111.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.111.0-dev.1...v0.111.0-dev.2) (2023-06-18)

### Bug Fixes

* **youtube/hide-layout-components:** preserve gap when hiding expandable chips ([b47a214](b47a214067))
2023-06-18 17:46:56 +00:00
oSumAtrIX
b47a214067 fix(youtube/hide-layout-components): preserve gap when hiding expandable chips 2023-06-18 19:44:37 +02:00
semantic-release-bot
007eaa0729 chore(release): 0.111.0-dev.1 [skip ci]
# [0.111.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.110.1-dev.3...v0.111.0-dev.1) (2023-06-18)

### Features

* **youtube/hide-layout-components:** separate hiding expandable chips and chapters ([80fb3a3](80fb3a31dd))
2023-06-18 16:51:30 +00:00
oSumAtrIX
80fb3a31dd feat(youtube/hide-layout-components): separate hiding expandable chips and chapters 2023-06-18 18:48:54 +02:00
oSumAtrIX
4536133bdc refactor: remove old migration code 2023-06-18 18:48:54 +02:00
semantic-release-bot
56970b356a chore(release): 0.110.1-dev.3 [skip ci]
## [0.110.1-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.110.1-dev.2...v0.110.1-dev.3) (2023-06-16)

### Bug Fixes

* **reddit/hide-ads:** only filter promoted links ([efc2b9b](efc2b9b6a3))
2023-06-16 21:28:35 +00:00
oSumAtrIX
efc2b9b6a3 fix(reddit/hide-ads): only filter promoted links 2023-06-16 23:25:58 +02:00
semantic-release-bot
8d0d5f9659 chore(release): 0.110.1-dev.2 [skip ci]
## [0.110.1-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.110.1-dev.1...v0.110.1-dev.2) (2023-06-14)

### Bug Fixes

* **youtube:** separate `hide-ads` to `hide-layout-components` patch ([bdce029](bdce0298c4))
2023-06-14 01:32:27 +00:00
oSumAtrIX
bdce0298c4 fix(youtube): separate hide-ads to hide-layout-components patch 2023-06-14 03:30:28 +02:00
semantic-release-bot
e2fa445c3f chore(release): 0.110.1-dev.1 [skip ci]
## [0.110.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.110.0...v0.110.1-dev.1) (2023-06-14)

### Bug Fixes

* don't include all Litho patches, when not included ([9952581](9952581a32))
2023-06-14 00:49:02 +00:00
oSumAtrIX
9952581a32 fix: don't include all Litho patches, when not included 2023-06-14 02:46:24 +02:00
semantic-release-bot
4aab2a1af6 chore(release): 0.110.0 [skip ci]
# [0.110.0](https://github.com/revanced/revanced-integrations/compare/v0.109.0...v0.110.0) (2023-06-12)

### Bug Fixes

* **youtube/swipe-controls:** require restart if settings are changed ([#417](https://github.com/revanced/revanced-integrations/issues/417)) ([f951897](f951897944))

### Features

* **reddit:** add `hide-promoted` patch ([#419](https://github.com/revanced/revanced-integrations/issues/419)) ([7eb209d](7eb209d853))
* **youtube/hide-ads:** hide mix playlists ([aa72125](aa72125317))
* **youtube/swipe-controls:** add option to save and restore brightness ([b5a71a8](b5a71a843e))
2023-06-12 01:45:28 +00:00
oSumAtrIX
309cda8848 chore: merge branch dev to main (#418) 2023-06-12 03:43:22 +02:00
semantic-release-bot
eb658298b8 chore(release): 0.110.0-dev.1 [skip ci]
# [0.110.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.109.1-dev.1...v0.110.0-dev.1) (2023-06-12)

### Features

* **reddit:** add `hide-promoted` patch ([#419](https://github.com/revanced/revanced-integrations/issues/419)) ([7eb209d](7eb209d853))
* **youtube/hide-ads:** hide mix playlists ([aa72125](aa72125317))
* **youtube/swipe-controls:** add option to save and restore brightness ([b5a71a8](b5a71a843e))
2023-06-12 01:07:07 +00:00
oSumAtrIX
add120348a ci: add cache step 2023-06-12 03:04:44 +02:00
oSumAtrIX
0654c1b42e ci: set JAVA version for Gradle manually 2023-06-12 03:04:44 +02:00
oSumAtrIX
26b6d47101 refactor: remove comments 2023-06-12 03:04:43 +02:00
oSumAtrIX
fd86684f73 ci: build before running semantic-release 2023-06-12 03:04:43 +02:00
oSumAtrIX
ccc93adae9 ci: remove unnecessary steps 2023-06-12 03:04:43 +02:00
LagradOst
7eb209d853 feat(reddit): add hide-promoted patch (#419)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-06-12 03:04:42 +02:00
oSumAtrIX
aa72125317 feat(youtube/hide-ads): hide mix playlists 2023-06-12 03:04:42 +02:00
oSumAtrIX
b5a71a843e feat(youtube/swipe-controls): add option to save and restore brightness 2023-06-01 00:56:32 +02:00
semantic-release-bot
4c77e7f3f7 chore(release): 0.109.1-dev.1 [skip ci]
## [0.109.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.109.0...v0.109.1-dev.1) (2023-05-31)

### Bug Fixes

* **youtube/swipe-controls:** require restart if settings are changed ([#417](https://github.com/revanced/revanced-integrations/issues/417)) ([f951897](f951897944))
2023-05-31 08:59:47 +00:00
LisoUseInAIKyrios
f951897944 fix(youtube/swipe-controls): require restart if settings are changed (#417) 2023-05-31 12:57:02 +04:00
semantic-release-bot
b1aa59c882 chore(release): 0.109.0 [skip ci]
# [0.109.0](https://github.com/revanced/revanced-integrations/compare/v0.108.0...v0.109.0) (2023-05-31)

### Bug Fixes

* **youtube/downloads:** rename patch to `external-downloads` ([#414](https://github.com/revanced/revanced-integrations/issues/414)) ([b3c7e7f](b3c7e7f638))
* **youtube/hide-player-buttons:** fix previous/next button showing if previous video exists ([#412](https://github.com/revanced/revanced-integrations/issues/412)) ([60f25a2](60f25a2af0))
* **youtube/hide-shorts-components:** hide new type of Shorts in feed ([f13a993](f13a99351c))

### Features

* **remove-screen-capture-restriction:** remove app constraint ([#411](https://github.com/revanced/revanced-integrations/issues/411)) ([31251f0](31251f0214))
* **youtube/hide-ads:** hide new type of ad ([2592508](25925085ad))
* **youtube/hide-seekbar:** more fine grained hiding of seekbar ([#409](https://github.com/revanced/revanced-integrations/issues/409)) ([40def9e](40def9e036))
* **youtube/hide-shorts-components:** hide channel bar & sound button ([1714700](1714700fb1))
* **youtube/hide-shorts-components:** hide shorts info panel ([#415](https://github.com/revanced/revanced-integrations/issues/415)) ([f5df201](f5df20134c))
2023-05-31 08:35:41 +00:00
oSumAtrIX
1c3d0bed32 chore: merge branch dev to main (#413) 2023-05-31 10:33:38 +02:00
semantic-release-bot
023ccbfec6 chore(release): 0.109.0-dev.6 [skip ci]
# [0.109.0-dev.6](https://github.com/revanced/revanced-integrations/compare/v0.109.0-dev.5...v0.109.0-dev.6) (2023-05-29)

### Features

* **youtube/hide-ads:** hide new type of ad ([2592508](25925085ad))
2023-05-29 23:27:42 +00:00
oSumAtrIX
25925085ad feat(youtube/hide-ads): hide new type of ad 2023-05-30 01:25:06 +02:00
semantic-release-bot
85e776dc63 chore(release): 0.109.0-dev.5 [skip ci]
# [0.109.0-dev.5](https://github.com/revanced/revanced-integrations/compare/v0.109.0-dev.4...v0.109.0-dev.5) (2023-05-28)

### Bug Fixes

* **youtube/hide-shorts-components:** hide new type of Shorts in feed ([f13a993](f13a99351c))
2023-05-28 15:45:07 +00:00
oSumAtrIX
f13a99351c fix(youtube/hide-shorts-components): hide new type of Shorts in feed 2023-05-28 17:42:31 +02:00
semantic-release-bot
4d7c62bb6d chore(release): 0.109.0-dev.4 [skip ci]
# [0.109.0-dev.4](https://github.com/revanced/revanced-integrations/compare/v0.109.0-dev.3...v0.109.0-dev.4) (2023-05-27)

### Features

* **youtube/hide-shorts-components:** hide channel bar & sound button ([1714700](1714700fb1))
2023-05-27 17:57:39 +00:00
oSumAtrIX
1714700fb1 feat(youtube/hide-shorts-components): hide channel bar & sound button 2023-05-27 19:55:14 +02:00
semantic-release-bot
f7a940ca06 chore(release): 0.109.0-dev.3 [skip ci]
# [0.109.0-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.109.0-dev.2...v0.109.0-dev.3) (2023-05-27)

### Features

* **youtube/hide-seekbar:** more fine grained hiding of seekbar ([#409](https://github.com/revanced/revanced-integrations/issues/409)) ([40def9e](40def9e036))
2023-05-27 07:54:23 +00:00
LisoUseInAIKyrios
40def9e036 feat(youtube/hide-seekbar): more fine grained hiding of seekbar (#409) 2023-05-27 11:51:50 +04:00
18 changed files with 637 additions and 549 deletions

View File

@@ -16,28 +16,32 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the release step uses its own credentials:
# https://github.com/cycjimmy/semantic-release-action#private-packages
persist-credentials: false
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
cache: 'npm'
- name: Setup semantic-release
run: npm install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
run: npm exec semantic-release
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the release step uses its own credentials:
# https://github.com/cycjimmy/semantic-release-action#private-packages
persist-credentials: false
fetch-depth: 0
- name: Cache
uses: actions/cache@v3
with:
path: |
${{ runner.home }}/.gradle/caches
${{ runner.home }}/.gradle/wrapper
.gradle
build
node_modules
key: ${{ runner.os }}-gradle-npm-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'package-lock.json') }}
- name: Setup Java
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
- name: Build with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew clean --no-daemon
- name: Setup semantic-release
run: npm install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
run: npm exec semantic-release

View File

@@ -1,3 +1,185 @@
## [0.111.2-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.111.2-dev.1...v0.111.2-dev.2) (2023-07-03)
### Bug Fixes
* **reddit/sanitize-sharing-links:** update patch to support latest app version ([#430](https://github.com/revanced/revanced-integrations/issues/430)) ([d947de2](https://github.com/revanced/revanced-integrations/commit/d947de2e03683889f11fc461dc53e08fee735ca8))
## [0.111.2-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.111.1...v0.111.2-dev.1) (2023-07-02)
### Bug Fixes
* **youtube/spoof-signature-verification:** remove auto re-enable functionality ([#428](https://github.com/revanced/revanced-integrations/issues/428)) ([8afe82c](https://github.com/revanced/revanced-integrations/commit/8afe82c0e078880d58e3adef23618a6feaf52e7e))
## [0.111.1](https://github.com/revanced/revanced-integrations/compare/v0.111.0...v0.111.1) (2023-07-01)
### Bug Fixes
* **youtube/client-spoof:** update settings text for known side effects of spoof signature ([#424](https://github.com/revanced/revanced-integrations/issues/424)) ([d7a3973](https://github.com/revanced/revanced-integrations/commit/d7a3973ef1e6c4443fc4d89f063bc6bf3446bec3))
* **youtube/disable-fullscreen-panels:** prompt to restart after turning on/off ([#426](https://github.com/revanced/revanced-integrations/issues/426)) ([328ecff](https://github.com/revanced/revanced-integrations/commit/328ecff18bf301ec8993bba49356f9813de1d901))
### Performance Improvements
* return earlier when possible ([#427](https://github.com/revanced/revanced-integrations/issues/427)) ([12f3f97](https://github.com/revanced/revanced-integrations/commit/12f3f975525863e593216ecf36ca817d162474e1))
## [0.111.1-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.111.1-dev.2...v0.111.1-dev.3) (2023-06-27)
### Performance Improvements
* return earlier when possible ([#427](https://github.com/revanced/revanced-integrations/issues/427)) ([12f3f97](https://github.com/revanced/revanced-integrations/commit/12f3f975525863e593216ecf36ca817d162474e1))
## [0.111.1-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.111.1-dev.1...v0.111.1-dev.2) (2023-06-25)
### Bug Fixes
* **youtube/disable-fullscreen-panels:** prompt to restart after turning on/off ([#426](https://github.com/revanced/revanced-integrations/issues/426)) ([328ecff](https://github.com/revanced/revanced-integrations/commit/328ecff18bf301ec8993bba49356f9813de1d901))
## [0.111.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.111.0...v0.111.1-dev.1) (2023-06-23)
### Bug Fixes
* **youtube/client-spoof:** update settings text for known side effects of spoof signature ([#424](https://github.com/revanced/revanced-integrations/issues/424)) ([d7a3973](https://github.com/revanced/revanced-integrations/commit/d7a3973ef1e6c4443fc4d89f063bc6bf3446bec3))
# [0.111.0](https://github.com/revanced/revanced-integrations/compare/v0.110.0...v0.111.0) (2023-06-21)
### Bug Fixes
* don't include all Litho patches, when not included ([9952581](https://github.com/revanced/revanced-integrations/commit/9952581a325b780f7dea074cc4ed138d7ac2758b))
* **reddit/hide-ads:** only filter promoted links ([efc2b9b](https://github.com/revanced/revanced-integrations/commit/efc2b9b6a39de93d6cc1052dfcea457aeaf949b2))
* **youtube/client-spoof:** use new visitor data to work around playback issues ([be9c948](https://github.com/revanced/revanced-integrations/commit/be9c948ce6135ec7fad4d7e7dc18be64e9dbb3eb))
* **youtube/hide-layout-components:** preserve gap when hiding expandable chips ([b47a214](https://github.com/revanced/revanced-integrations/commit/b47a214067031c099df990d4c83a1d96ab7b3c34))
* **youtube:** separate `hide-ads` to `hide-layout-components` patch ([bdce029](https://github.com/revanced/revanced-integrations/commit/bdce0298c404be6e5c3ae6854f3609d82ad76e28))
### Features
* **youtube/hide-layout-components:** separate hiding expandable chips and chapters ([80fb3a3](https://github.com/revanced/revanced-integrations/commit/80fb3a31dd4604b0d1d72c6033624d2d780746ea))
# [0.111.0-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.111.0-dev.2...v0.111.0-dev.3) (2023-06-21)
### Bug Fixes
* **youtube/client-spoof:** use new visitor data to work around playback issues ([be9c948](https://github.com/revanced/revanced-integrations/commit/be9c948ce6135ec7fad4d7e7dc18be64e9dbb3eb))
# [0.111.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.111.0-dev.1...v0.111.0-dev.2) (2023-06-18)
### Bug Fixes
* **youtube/hide-layout-components:** preserve gap when hiding expandable chips ([b47a214](https://github.com/revanced/revanced-integrations/commit/b47a214067031c099df990d4c83a1d96ab7b3c34))
# [0.111.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.110.1-dev.3...v0.111.0-dev.1) (2023-06-18)
### Features
* **youtube/hide-layout-components:** separate hiding expandable chips and chapters ([80fb3a3](https://github.com/revanced/revanced-integrations/commit/80fb3a31dd4604b0d1d72c6033624d2d780746ea))
## [0.110.1-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.110.1-dev.2...v0.110.1-dev.3) (2023-06-16)
### Bug Fixes
* **reddit/hide-ads:** only filter promoted links ([efc2b9b](https://github.com/revanced/revanced-integrations/commit/efc2b9b6a39de93d6cc1052dfcea457aeaf949b2))
## [0.110.1-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.110.1-dev.1...v0.110.1-dev.2) (2023-06-14)
### Bug Fixes
* **youtube:** separate `hide-ads` to `hide-layout-components` patch ([bdce029](https://github.com/revanced/revanced-integrations/commit/bdce0298c404be6e5c3ae6854f3609d82ad76e28))
## [0.110.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.110.0...v0.110.1-dev.1) (2023-06-14)
### Bug Fixes
* don't include all Litho patches, when not included ([9952581](https://github.com/revanced/revanced-integrations/commit/9952581a325b780f7dea074cc4ed138d7ac2758b))
# [0.110.0](https://github.com/revanced/revanced-integrations/compare/v0.109.0...v0.110.0) (2023-06-12)
### Bug Fixes
* **youtube/swipe-controls:** require restart if settings are changed ([#417](https://github.com/revanced/revanced-integrations/issues/417)) ([f951897](https://github.com/revanced/revanced-integrations/commit/f9518979448bf40f0a85ad88ac5971ade9343566))
### Features
* **reddit:** add `hide-promoted` patch ([#419](https://github.com/revanced/revanced-integrations/issues/419)) ([7eb209d](https://github.com/revanced/revanced-integrations/commit/7eb209d8533f68cd344c331482b38bfcf4baca06))
* **youtube/hide-ads:** hide mix playlists ([aa72125](https://github.com/revanced/revanced-integrations/commit/aa721253170890a35640b860be569932b8536345))
* **youtube/swipe-controls:** add option to save and restore brightness ([b5a71a8](https://github.com/revanced/revanced-integrations/commit/b5a71a843eaecaf9f2566d0b6a3c21422b14a44f))
# [0.110.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.109.1-dev.1...v0.110.0-dev.1) (2023-06-12)
### Features
* **reddit:** add `hide-promoted` patch ([#419](https://github.com/revanced/revanced-integrations/issues/419)) ([7eb209d](https://github.com/revanced/revanced-integrations/commit/7eb209d8533f68cd344c331482b38bfcf4baca06))
* **youtube/hide-ads:** hide mix playlists ([aa72125](https://github.com/revanced/revanced-integrations/commit/aa721253170890a35640b860be569932b8536345))
* **youtube/swipe-controls:** add option to save and restore brightness ([b5a71a8](https://github.com/revanced/revanced-integrations/commit/b5a71a843eaecaf9f2566d0b6a3c21422b14a44f))
## [0.109.1-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.109.0...v0.109.1-dev.1) (2023-05-31)
### Bug Fixes
* **youtube/swipe-controls:** require restart if settings are changed ([#417](https://github.com/revanced/revanced-integrations/issues/417)) ([f951897](https://github.com/revanced/revanced-integrations/commit/f9518979448bf40f0a85ad88ac5971ade9343566))
# [0.109.0](https://github.com/revanced/revanced-integrations/compare/v0.108.0...v0.109.0) (2023-05-31)
### Bug Fixes
* **youtube/downloads:** rename patch to `external-downloads` ([#414](https://github.com/revanced/revanced-integrations/issues/414)) ([b3c7e7f](https://github.com/revanced/revanced-integrations/commit/b3c7e7f63828d299199f80d09c1349de22d8d198))
* **youtube/hide-player-buttons:** fix previous/next button showing if previous video exists ([#412](https://github.com/revanced/revanced-integrations/issues/412)) ([60f25a2](https://github.com/revanced/revanced-integrations/commit/60f25a2af0bee0301bb84ac69b586343485003bb))
* **youtube/hide-shorts-components:** hide new type of Shorts in feed ([f13a993](https://github.com/revanced/revanced-integrations/commit/f13a99351c82682d982b0d430a2ae2d57a5fe148))
### Features
* **remove-screen-capture-restriction:** remove app constraint ([#411](https://github.com/revanced/revanced-integrations/issues/411)) ([31251f0](https://github.com/revanced/revanced-integrations/commit/31251f0214b6d37a9407975a23dbdd43e3cad611))
* **youtube/hide-ads:** hide new type of ad ([2592508](https://github.com/revanced/revanced-integrations/commit/25925085adbfc9b36918ecc4da55d76215db74ef))
* **youtube/hide-seekbar:** more fine grained hiding of seekbar ([#409](https://github.com/revanced/revanced-integrations/issues/409)) ([40def9e](https://github.com/revanced/revanced-integrations/commit/40def9e036129e9f70549db5fd219f18618e931d))
* **youtube/hide-shorts-components:** hide channel bar & sound button ([1714700](https://github.com/revanced/revanced-integrations/commit/1714700fb18d58123672bdc501f9caa77788af4f))
* **youtube/hide-shorts-components:** hide shorts info panel ([#415](https://github.com/revanced/revanced-integrations/issues/415)) ([f5df201](https://github.com/revanced/revanced-integrations/commit/f5df20134c376c351b5d7d9881c45876463734f9))
# [0.109.0-dev.6](https://github.com/revanced/revanced-integrations/compare/v0.109.0-dev.5...v0.109.0-dev.6) (2023-05-29)
### Features
* **youtube/hide-ads:** hide new type of ad ([2592508](https://github.com/revanced/revanced-integrations/commit/25925085adbfc9b36918ecc4da55d76215db74ef))
# [0.109.0-dev.5](https://github.com/revanced/revanced-integrations/compare/v0.109.0-dev.4...v0.109.0-dev.5) (2023-05-28)
### Bug Fixes
* **youtube/hide-shorts-components:** hide new type of Shorts in feed ([f13a993](https://github.com/revanced/revanced-integrations/commit/f13a99351c82682d982b0d430a2ae2d57a5fe148))
# [0.109.0-dev.4](https://github.com/revanced/revanced-integrations/compare/v0.109.0-dev.3...v0.109.0-dev.4) (2023-05-27)
### Features
* **youtube/hide-shorts-components:** hide channel bar & sound button ([1714700](https://github.com/revanced/revanced-integrations/commit/1714700fb18d58123672bdc501f9caa77788af4f))
# [0.109.0-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.109.0-dev.2...v0.109.0-dev.3) (2023-05-27)
### Features
* **youtube/hide-seekbar:** more fine grained hiding of seekbar ([#409](https://github.com/revanced/revanced-integrations/issues/409)) ([40def9e](https://github.com/revanced/revanced-integrations/commit/40def9e036129e9f70549db5fd219f18618e931d))
# [0.109.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.109.0-dev.1...v0.109.0-dev.2) (2023-05-27)

View File

@@ -2,15 +2,16 @@ package app.revanced.integrations.patches;
import static app.revanced.integrations.utils.ReVancedUtils.containsAny;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.shared.PlayerType;
import app.revanced.integrations.utils.LogHelper;
import app.revanced.integrations.utils.ReVancedUtils;
public class SpoofSignatureVerificationPatch {
/**
* Enable/disable all workarounds that are required due to signature spoofing.
*/
private static final boolean WORKAROUND = true;
/**
* Protobuf parameters used for autoplay in scrim.
* Prepend this parameter to mute video playback (for autoplay in feed)
@@ -18,10 +19,12 @@ public class SpoofSignatureVerificationPatch {
private static final String PROTOBUF_PARAMETER_SCRIM = "SAFgAXgB";
/**
* Protobuf parameter of shorts and YouTube stories.
* Protobuf parameter also used by
* <a href="https://github.com/yt-dlp/yt-dlp/blob/81ca451480051d7ce1a31c017e005358345a9149/yt_dlp/extractor/youtube.py#L3602">yt-dlp</a>
* <br>
* Known issue: captions are positioned on upper area in the player.
*/
private static final String PROTOBUF_PARAMETER_SHORTS = "8AEB"; // "8AEByAMTuAQP"
private static final String PROTOBUF_PLAYER_PARAMS = "CgIQBg==";
/**
* Target Protobuf parameters.
@@ -31,28 +34,6 @@ public class SpoofSignatureVerificationPatch {
"SAFg" // Autoplay in scrim
};
/**
* On app first start, the first video played usually contains a single non-default window setting value
* and all other subtitle settings for the video are (incorrect) default shorts window settings.
* For this situation, the shorts settings must be replaced.
*
* But some videos use multiple text positions on screen (such as https://youtu.be/3hW1rMNC89o),
* and by chance many of the subtitles uses window positions that match a default shorts position.
* To handle these videos, selectively allowing the shorts specific window settings to 'pass thru' unchanged,
* but only if the video contains multiple non-default subtitle window positions.
*
* Do not enable 'pass thru mode' until this many non default subtitle settings are observed for a single video.
*/
private static final int NUMBER_OF_NON_DEFAULT_SUBTITLES_BEFORE_ENABLING_PASSTHRU = 2;
/**
* The number of non default subtitle settings encountered for the current video.
*/
private static int numberOfNonDefaultSettingsObserved;
@Nullable
private static String currentVideoId;
/**
* Injection point.
*
@@ -66,17 +47,18 @@ public class SpoofSignatureVerificationPatch {
LogHelper.printDebug(() -> "Original protobuf parameter value: " + originalValue);
// Video is Short or Story.
var isPlayingShorts = originalValue.contains(PROTOBUF_PARAMETER_SHORTS);
if (isPlayingShorts) return originalValue;
if (!WORKAROUND) return PROTOBUF_PLAYER_PARAMS;
var isPlayingVideo = originalValue.contains(PROTOBUF_PLAYER_PARAMS);
if (isPlayingVideo) return originalValue;
boolean isPlayingFeed = containsAny(originalValue, PROTOBUF_PARAMETER_TARGETS) && PlayerType.getCurrent() == PlayerType.INLINE_MINIMAL;
if (isPlayingFeed) {
// Videos in feed won't autoplay with sound.
return PROTOBUF_PARAMETER_SCRIM + PROTOBUF_PARAMETER_SHORTS;
return PROTOBUF_PARAMETER_SCRIM + PROTOBUF_PLAYER_PARAMS;
} else {
// Spoof the parameter to prevent playback issues.
return PROTOBUF_PARAMETER_SHORTS;
return PROTOBUF_PLAYER_PARAMS;
}
} catch (Exception ex) {
LogHelper.printException(() -> "overrideProtobufParameter failure", ex);
@@ -85,140 +67,4 @@ public class SpoofSignatureVerificationPatch {
return originalValue;
}
/**
* Injection point. Runs off the main thread.
* <p>
* Used to check the response code of video playback requests made by YouTube.
* Response code of interest is 403 that indicate a signature verification failure for the current request
*
* @param responseCode HTTP status code of the completed YouTube connection
*/
public static void onResponse(int responseCode) {
try {
if (responseCode < 400 || responseCode >= 500) {
return; // everything normal
}
LogHelper.printDebug(() -> "YouTube HTTP status code: " + responseCode);
if (SettingsEnum.SPOOF_SIGNATURE_VERIFICATION.getBoolean()) {
return; // already enabled
}
SettingsEnum.SPOOF_SIGNATURE_VERIFICATION.saveValue(true);
ReVancedUtils.showToastLong("Spoofing app signature to prevent playback issues");
// it would be great if the video could be forcefully reloaded, but currently there is no code to do this
} catch (Exception ex) {
LogHelper.printException(() -> "onResponse failure", ex);
}
}
/**
* Last WindowsSetting constructor values. Values are checked for changes to reduce log spam.
*/
private static int lastAp, lastAh, lastAv;
private static boolean lastVs, lastSd;
/**
* Injection point. Overrides values passed into SubtitleWindowSettings constructor.
*
* @param ap anchor position. A bitmask with 6 bit fields, that appears to indicate the layout position on screen
* @param ah anchor horizontal. A percentage [0, 100], that appears to be a horizontal text anchor point
* @param av anchor vertical. A percentage [0, 100], that appears to be a vertical text anchor point
* @param vs appears to indicate if subtitles exist, and the value is always true.
* @param sd function is not entirely clear
*/
public static int[] getSubtitleWindowSettingsOverride(int ap, int ah, int av, boolean vs, boolean sd) {
final boolean signatureSpoofing = SettingsEnum.SPOOF_SIGNATURE_VERIFICATION.getBoolean();
if (SettingsEnum.DEBUG.getBoolean()) {
if (ap != lastAp || ah != lastAh || av != lastAv || vs != lastVs || sd != lastSd) {
LogHelper.printDebug(() -> "video: " + VideoInformation.getVideoId() + " spoof: " + signatureSpoofing
+ " ap:" + ap + " ah:" + ah + " av:" + av + " vs:" + vs + " sd:" + sd);
lastAp = ap;
lastAh = ah;
lastAv = av;
lastVs = vs;
lastSd = sd;
}
}
// Videos with custom captions that specify screen positions appear to always have correct screen positions (even with spoofing).
// But for auto generated and most other captions, the spoof incorrectly gives various default Shorts caption settings.
// Check for these known default shorts captions parameters, and replace with the known correct values.
//
// If a regular video uses a custom subtitle setting that match a default short setting,
// then this will incorrectly replace the setting.
// But, if the video uses multiple subtitles in different screen locations, then detect the non-default values
// and do not replace any window settings for the video (regardless if they match a shorts default).
if (signatureSpoofing && !PlayerType.getCurrent().isNoneOrHidden()
&& numberOfNonDefaultSettingsObserved < NUMBER_OF_NON_DEFAULT_SUBTITLES_BEFORE_ENABLING_PASSTHRU) {
for (SubtitleWindowReplacementSettings setting : SubtitleWindowReplacementSettings.values()) {
if (setting.match(ap, ah, av, vs, sd)) {
return setting.replacementSetting();
}
}
numberOfNonDefaultSettingsObserved++;
LogHelper.printDebug(() ->
numberOfNonDefaultSettingsObserved < NUMBER_OF_NON_DEFAULT_SUBTITLES_BEFORE_ENABLING_PASSTHRU
? "Non default subtitle found."
: "Multiple non default subtitles found. Allowing all subtitles for this video to pass thru unchanged.");
}
return new int[]{ap, ah, av};
}
/**
* Injection point.
*/
public static void setCurrentVideoId(@NonNull String videoId) {
try {
if (videoId.equals(currentVideoId)) {
return;
}
currentVideoId = videoId;
numberOfNonDefaultSettingsObserved = 0;
} catch (Exception ex) {
LogHelper.printException(() -> "setCurrentVideoId failure", ex);
}
}
/**
* Known incorrect default Shorts subtitle parameters, and the corresponding correct (non-Shorts) values.
*/
private enum SubtitleWindowReplacementSettings {
DEFAULT_SHORTS_PARAMETERS_1(10, 50, 0, true, false,
34, 50, 95),
DEFAULT_SHORTS_PARAMETERS_2(9, 20, 0, true, false,
34, 50, 90),
DEFAULT_SHORTS_PARAMETERS_3(9, 20, 0, true, true,
33, 20, 100);
// original values
final int ap, ah, av;
final boolean vs, sd;
// replacement int values
final int[] replacement;
SubtitleWindowReplacementSettings(int ap, int ah, int av, boolean vs, boolean sd,
int replacementAp, int replacementAh, int replacementAv) {
this.ap = ap;
this.ah = ah;
this.av = av;
this.vs = vs;
this.sd = sd;
this.replacement = new int[]{replacementAp, replacementAh, replacementAv};
}
boolean match(int ap, int ah, int av, boolean vs, boolean sd) {
return this.ap == ap && this.ah == ah && this.av == av && this.vs == vs && this.sd == sd;
}
int[] replacementSetting() {
return replacement;
}
}
}

View File

@@ -0,0 +1,3 @@
package app.revanced.integrations.patches.components;
final class DummyFilter extends Filter { }

View File

@@ -0,0 +1,222 @@
package app.revanced.integrations.patches.components;
import android.os.Build;
import android.view.View;
import androidx.annotation.RequiresApi;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.utils.ReVancedUtils;
public final class LayoutComponentsFilter extends Filter {
private final String[] exceptions;
private final CustomFilterGroup custom;
// region Mix playlists
private final ByteArrayAsStringFilterGroup mixPlaylists;
private final ByteArrayAsStringFilterGroup imageHosting;
// endregion
@RequiresApi(api = Build.VERSION_CODES.N)
public LayoutComponentsFilter() {
exceptions = new String[]{
"home_video_with_context",
"related_video_with_context",
"comment_thread", // skip filtering anything in the comments
"|comment.", // skip filtering anything in the comments replies
"library_recent_shelf",
};
custom = new CustomFilterGroup(
SettingsEnum.CUSTOM_FILTER,
SettingsEnum.CUSTOM_FILTER_STRINGS
);
final var communityPosts = new StringFilterGroup(
SettingsEnum.HIDE_COMMUNITY_POSTS,
"post_base_wrapper"
);
final var communityGuidelines = new StringFilterGroup(
SettingsEnum.HIDE_COMMUNITY_GUIDELINES,
"community_guidelines"
);
final var subscribersCommunityGuidelines = new StringFilterGroup(
SettingsEnum.HIDE_SUBSCRIBERS_COMMUNITY_GUIDELINES,
"sponsorships_comments_upsell"
);
final var channelMemberShelf = new StringFilterGroup(
SettingsEnum.HIDE_CHANNEL_MEMBER_SHELF,
"member_recognition_shelf"
);
final var compactBanner = new StringFilterGroup(
SettingsEnum.HIDE_COMPACT_BANNER,
"compact_banner"
);
final var inFeedSurvey = new StringFilterGroup(
SettingsEnum.HIDE_FEED_SURVEY,
"in_feed_survey",
"slimline_survey"
);
final var medicalPanel = new StringFilterGroup(
SettingsEnum.HIDE_MEDICAL_PANELS,
"medical_panel"
);
final var paidContent = new StringFilterGroup(
SettingsEnum.HIDE_PAID_CONTENT,
"paid_content_overlay"
);
final var infoPanel = new StringFilterGroup(
SettingsEnum.HIDE_HIDE_INFO_PANELS,
"publisher_transparency_panel",
"single_item_information_panel"
);
final var latestPosts = new StringFilterGroup(
SettingsEnum.HIDE_HIDE_LATEST_POSTS,
"post_shelf"
);
final var channelGuidelines = new StringFilterGroup(
SettingsEnum.HIDE_HIDE_CHANNEL_GUIDELINES,
"channel_guidelines_entry_banner"
);
final var audioTrackButton = new StringFilterGroup(
SettingsEnum.HIDE_AUDIO_TRACK_BUTTON,
"multi_feed_icon_button"
);
final var artistCard = new StringFilterGroup(
SettingsEnum.HIDE_ARTIST_CARDS,
"official_card"
);
final var expandableMetadata = new StringFilterGroup(
SettingsEnum.HIDE_EXPANDABLE_CHIP,
"inline_expander"
);
final var chapters = new StringFilterGroup(
SettingsEnum.HIDE_CHAPTERS,
"macro_markers_carousel"
);
final var channelBar = new StringFilterGroup(
SettingsEnum.HIDE_CHANNEL_BAR,
"channel_bar"
);
final var relatedVideos = new StringFilterGroup(
SettingsEnum.HIDE_RELATED_VIDEOS,
"fullscreen_related_videos"
);
final var quickActions = new StringFilterGroup(
SettingsEnum.HIDE_QUICK_ACTIONS,
"quick_actions"
);
final var imageShelf = new StringFilterGroup(
SettingsEnum.HIDE_IMAGE_SHELF,
"image_shelf"
);
final var graySeparator = new StringFilterGroup(
SettingsEnum.HIDE_GRAY_SEPARATOR,
"cell_divider" // layout residue (gray line above the buttoned ad),
);
// region Mix playlists
mixPlaylists = new ByteArrayAsStringFilterGroup(
SettingsEnum.HIDE_MIX_PLAYLISTS,
"&list=",
"YouTube Music"
);
imageHosting = new ByteArrayAsStringFilterGroup(
SettingsEnum.HIDE_MIX_PLAYLISTS, // Unused
"ggpht.com"
);
// endregion
this.pathFilterGroups.addAll(
channelBar,
communityPosts,
paidContent,
latestPosts,
chapters,
communityGuidelines,
quickActions,
expandableMetadata,
relatedVideos,
compactBanner,
inFeedSurvey,
medicalPanel,
infoPanel,
channelGuidelines,
audioTrackButton,
artistCard,
imageShelf,
subscribersCommunityGuidelines,
channelMemberShelf
);
final var carouselAd = new StringFilterGroup(
SettingsEnum.HIDE_GENERAL_ADS,
"carousel_ad"
);
this.identifierFilterGroups.addAll(
graySeparator,
carouselAd
);
}
private boolean isMixPlaylistFiltered(final byte[] _protobufBufferArray) {
if (!mixPlaylists.isEnabled()) return false;
// Two checks are required to prevent false positives.
// First check if the current buffer potentially contains a mix playlist.
if (!mixPlaylists.check(_protobufBufferArray).isFiltered()) return false;
// Ensure that the buffer actually contains a mix playlist.
return imageHosting.check(_protobufBufferArray).isFiltered();
}
@Override
public boolean isFiltered(final String path, final String identifier, final byte[] _protobufBufferArray) {
if (custom.isEnabled() && custom.check(path).isFiltered())
return true;
if (ReVancedUtils.containsAny(path, exceptions))
return false; // Exceptions are not filtered.
if (super.isFiltered(path, identifier, _protobufBufferArray))
return true;
return isMixPlaylistFiltered(_protobufBufferArray);
}
/**
* Hide the view, which shows ads in the homepage.
*
* @param view The view, which shows ads.
*/
public static void hideAdAttributionView(View view) {
ReVancedUtils.hideViewBy1dpUnderCondition(SettingsEnum.HIDE_GENERAL_ADS, view);
}
}

View File

@@ -1,9 +1,11 @@
package app.revanced.integrations.patches.components;
import android.os.Build;
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.utils.LogHelper;
import app.revanced.integrations.utils.ReVancedUtils;
import java.nio.ByteBuffer;
import java.util.ArrayList;
@@ -12,10 +14,6 @@ import java.util.Iterator;
import java.util.Spliterator;
import java.util.function.Consumer;
import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.utils.LogHelper;
import app.revanced.integrations.utils.ReVancedUtils;
abstract class FilterGroup<T> {
final static class FilterGroupResult {
private final boolean filtered;
@@ -85,9 +83,10 @@ final class CustomFilterGroup extends StringFilterGroup {
class ByteArrayFilterGroup extends FilterGroup<byte[]> {
// Modified implementation from https://stackoverflow.com/a/1507813
private int indexOf(final byte[] data, final byte[] pattern) {
if (data.length == 0)
return -1;
// Computes the failure function using a boot-strapping process,
// where the pattern is matched against itself.
final int[] failure = new int[pattern.length];
int j = 0;
@@ -105,7 +104,6 @@ class ByteArrayFilterGroup extends FilterGroup<byte[]> {
// KMP matching algorithm.
j = 0;
if (data.length == 0) return -1;
for (int i = 0; i < data.length; i++) {
while (j > 0 && pattern[j] != data[i]) {
@@ -132,7 +130,8 @@ class ByteArrayFilterGroup extends FilterGroup<byte[]> {
public FilterGroupResult check(final byte[] bytes) {
var matched = false;
for (byte[] filter : filters) {
if (indexOf(bytes, filter) == -1) continue;
if (indexOf(bytes, filter) == -1)
continue;
matched = true;
break;
@@ -183,7 +182,8 @@ abstract class FilterGroupList<V, T extends FilterGroup<V>> implements Iterable<
protected boolean contains(final V stack) {
for (T filterGroup : this) {
if (!filterGroup.isEnabled()) continue;
if (!filterGroup.isEnabled())
continue;
var result = filterGroup.check(stack);
if (result.isFiltered()) {
@@ -207,7 +207,8 @@ abstract class Filter {
final protected ByteArrayFilterGroupList protobufBufferFilterGroups = new ByteArrayFilterGroupList();
/**
* Check if the given path, identifier or protobuf buffer is filtered by any {@link FilterGroup}.
* Check if the given path, identifier or protobuf buffer is filtered by any
* {@link FilterGroup}.
*
* @return True if filtered, false otherwise.
*/
@@ -234,30 +235,38 @@ abstract class Filter {
@RequiresApi(api = Build.VERSION_CODES.N)
@SuppressWarnings("unused")
public final class LithoFilterPatch {
private static final Filter[] filters = new Filter[]{
new AdsFilter(),
new ButtonsFilter(),
new CommentsFilter(),
new ShortsFilter()
private static final Filter[] filters = new Filter[] {
new DummyFilter() // Replaced by patch.
};
@SuppressWarnings("unused")
public static boolean filter(final StringBuilder pathBuilder, final String identifier, final ByteBuffer protobufBuffer) {
public static boolean filter(final StringBuilder pathBuilder, final String identifier,
final ByteBuffer protobufBuffer) {
// TODO: Maybe this can be moved to the Filter class, to prevent unnecessary
// string creation
// because some filters might not need the path.
var path = pathBuilder.toString();
// It is assumed that protobufBuffer is empty as well in this case.
if (path.isEmpty()) return false;
if (path.isEmpty())
return false;
LogHelper.printDebug(() -> String.format(
"Searching (ID: %s, Buffer-size: %s): %s",
identifier, protobufBuffer.remaining(), path
));
identifier, protobufBuffer.remaining(), path));
var protobufBufferArray = protobufBuffer.array();
// check if any filter-group
for (var filter : filters)
if (filter.isFiltered(path, identifier, protobufBufferArray)) return true;
for (var filter : filters) {
var filtered = filter.isFiltered(path, identifier, protobufBufferArray);
LogHelper.printDebug(
() -> String.format("%s (ID: %s): %s", filtered ? "Filtered" : "Unfiltered", identifier, path));
if (filtered)
return true;
}
return false;
}
}
}

View File

@@ -43,19 +43,31 @@ public final class ShortsFilter extends Filter {
"sponsor_button"
);
final var soundButton = new StringFilterGroup(
SettingsEnum.HIDE_SHORTS_SOUND_BUTTON,
"reel_pivot_button"
);
final var channelBar = new StringFilterGroup(
SettingsEnum.HIDE_SHORTS_CHANNEL_BAR,
"reel_channel_bar"
);
final var shorts = new StringFilterGroup(
SettingsEnum.HIDE_SHORTS,
"shorts_shelf",
"inline_shorts",
"shorts_grid"
"shorts_grid",
"shorts_video_cell"
);
this.pathFilterGroups.addAll(joinButton, subscribeButton);
this.pathFilterGroups.addAll(joinButton, subscribeButton, soundButton, channelBar);
this.identifierFilterGroups.addAll(shorts, thanksButton);
}
@Override
boolean isFiltered(final String path, final String identifier, final byte[] protobufBufferArray) {
boolean isFiltered(final String path, final String identifier,
final byte[] protobufBufferArray) {
// Filter the path only when reelChannelBar is visible.
if (reelChannelBar.check(path).isFiltered())
if (this.pathFilterGroups.contains(path)) return true;

View File

@@ -22,7 +22,7 @@ public class ProgressBarDrawable extends Drawable {
@Override
public void draw(@NonNull Canvas canvas) {
if (SettingsEnum.HIDE_SEEKBAR.getBoolean()) {
if (SettingsEnum.HIDE_SEEKBAR_THUMBNAIL.getBoolean()) {
return;
}
paint.setColor(SeekbarColorPatch.getCustomSeekbarColor());

View File

@@ -51,12 +51,31 @@ public final class SeekbarColorPatch {
return customSeekbarColor;
}
/**
* Injection point.
*
* Overrides color when seekbar is clicked, and all Litho components that use the YouTube seekbar color.
* Overrides all Litho components that use the YouTube seekbar color.
* Used only for the video thumbnails seekbar.
*
* If {@link SettingsEnum#HIDE_SEEKBAR_THUMBNAIL} is enabled, this returns a fully transparent color.
*/
public static int getSeekbarColorOverride(int colorValue) {
public static int getLithoColor(int colorValue) {
if (colorValue == ORIGINAL_SEEKBAR_COLOR) {
if (SettingsEnum.HIDE_SEEKBAR_THUMBNAIL.getBoolean()) {
return 0x00000000;
}
return getSeekbarColorValue(ORIGINAL_SEEKBAR_COLOR);
}
return colorValue;
}
/**
* Injection point.
*
* Overrides color when video player seekbar is clicked.
*/
public static int getVideoPlayerSeekbarClickedColor(int colorValue) {
return colorValue == ORIGINAL_SEEKBAR_COLOR
? getSeekbarColorValue(ORIGINAL_SEEKBAR_COLOR)
: colorValue;
@@ -65,18 +84,20 @@ public final class SeekbarColorPatch {
/**
* Injection point.
*
* If {@link SettingsEnum#HIDE_SEEKBAR} is enabled, this returns a fully transparent color.
*
* Otherwise the original color is changed to the custom seekbar color, while retaining
* Overrides color used for the video player seekbar.
*/
public static int getVideoPlayerSeekbarColor(int originalColor) {
return getSeekbarColorValue(originalColor);
}
/**
* Color parameter is changed to the custom seekbar color, while retaining
* the brightness and alpha changes of the parameter value compared to the original seekbar color.
*/
public static int getSeekbarColorValue(int originalColor) {
private static int getSeekbarColorValue(int originalColor) {
try {
if (SettingsEnum.HIDE_SEEKBAR.getBoolean()) {
return 0x00000000;
}
if (customSeekbarColor == ORIGINAL_SEEKBAR_COLOR) {
return originalColor; // Nothing to do
return originalColor; // nothing to do
}
final int alphaDifference = Color.alpha(originalColor) - Color.alpha(ORIGINAL_SEEKBAR_COLOR);

View File

@@ -67,7 +67,8 @@ public enum SettingsEnum {
// Layout
HIDE_CHANNEL_BAR("revanced_hide_channel_bar", BOOLEAN, FALSE),
HIDE_CHANNEL_MEMBER_SHELF("revanced_hide_channel_member_shelf", BOOLEAN, TRUE),
HIDE_CHAPTER_TEASER("revanced_hide_chapter_teaser", BOOLEAN, TRUE),
HIDE_EXPANDABLE_CHIP("revanced_hide_expandable_chip", BOOLEAN, TRUE),
HIDE_CHAPTERS("revanced_hide_chapters", BOOLEAN, TRUE),
HIDE_COMMUNITY_GUIDELINES("revanced_hide_community_guidelines", BOOLEAN, TRUE),
HIDE_COMMUNITY_POSTS("revanced_hide_community_posts", BOOLEAN, FALSE),
HIDE_COMPACT_BANNER("revanced_hide_compact_banner", BOOLEAN, TRUE),
@@ -85,6 +86,7 @@ public enum SettingsEnum {
HIDE_WEB_SEARCH_RESULTS("revanced_hide_web_search_results", BOOLEAN, TRUE),
HIDE_QUICK_ACTIONS("revanced_hide_quick_actions", BOOLEAN, FALSE),
HIDE_RELATED_VIDEOS("revanced_hide_related_videos", BOOLEAN, FALSE),
HIDE_MIX_PLAYLISTS("revanced_hide_mix_playlists", BOOLEAN, TRUE),
// Action buttons
HIDE_LIKE_DISLIKE_BUTTON("revanced_hide_like_dislike_button", BOOLEAN, FALSE),
@@ -108,7 +110,7 @@ public enum SettingsEnum {
HIDE_EMAIL_ADDRESS("revanced_hide_email_address", BOOLEAN, FALSE),
HIDE_ENDSCREEN_CARDS("revanced_hide_endscreen_cards", BOOLEAN, TRUE),
HIDE_FLOATING_MICROPHONE_BUTTON("revanced_hide_floating_microphone_button", BOOLEAN, TRUE, true),
HIDE_FULLSCREEN_PANELS("revanced_hide_fullscreen_panels", BOOLEAN, TRUE),
HIDE_FULLSCREEN_PANELS("revanced_hide_fullscreen_panels", BOOLEAN, TRUE, true),
HIDE_GET_PREMIUM("revanced_hide_get_premium", BOOLEAN, TRUE),
HIDE_INFO_CARDS("revanced_hide_info_cards", BOOLEAN, TRUE),
HIDE_LOAD_MORE_BUTTON("revanced_hide_load_more_button", BOOLEAN, TRUE, true),
@@ -116,6 +118,7 @@ public enum SettingsEnum {
HIDE_PLAYER_OVERLAY("revanced_hide_player_overlay", BOOLEAN, FALSE, true),
HIDE_PREVIEW_COMMENT("revanced_hide_preview_comment", BOOLEAN, FALSE, true),
HIDE_SEEKBAR("revanced_hide_seekbar", BOOLEAN, FALSE, true),
HIDE_SEEKBAR_THUMBNAIL("revanced_hide_seekbar_thumbnail", BOOLEAN, FALSE, true),
HIDE_HOME_BUTTON("revanced_hide_home_button", BOOLEAN, FALSE, true),
HIDE_SHORTS_BUTTON("revanced_hide_shorts_button", BOOLEAN, TRUE, true),
HIDE_SUBSCRIPTIONS_BUTTON("revanced_hide_subscriptions_button", BOOLEAN, FALSE, true),
@@ -139,6 +142,8 @@ public enum SettingsEnum {
HIDE_SHORTS_REMIX_BUTTON("revanced_hide_shorts_remix_button", BOOLEAN, TRUE),
HIDE_SHORTS_SHARE_BUTTON("revanced_hide_shorts_share_button", BOOLEAN, FALSE),
HIDE_SHORTS_INFO_PANEL("revanced_hide_shorts_info_panel", BOOLEAN, TRUE),
HIDE_SHORTS_SOUND_BUTTON("revanced_hide_shorts_sound_button", BOOLEAN, FALSE),
HIDE_SHORTS_CHANNEL_BAR("revanced_hide_shorts_channel_bar", BOOLEAN, FALSE),
HIDE_SHORTS_NAVIGATION_BAR("revanced_hide_shorts_navigation_bar", BOOLEAN, TRUE, true),
HIDE_SHORTS("revanced_hide_shorts", BOOLEAN, FALSE, true),
@@ -155,15 +160,17 @@ public enum SettingsEnum {
SWIPE_VOLUME("revanced_swipe_volume", BOOLEAN, TRUE),
SWIPE_PRESS_TO_ENGAGE("revanced_swipe_press_to_engage", BOOLEAN, FALSE, true,
parents(SWIPE_BRIGHTNESS, SWIPE_VOLUME)),
SWIPE_HAPTIC_FEEDBACK("revanced_swipe_haptic_feedback", BOOLEAN, TRUE,
SWIPE_HAPTIC_FEEDBACK("revanced_swipe_haptic_feedback", BOOLEAN, TRUE, true,
parents(SWIPE_BRIGHTNESS, SWIPE_VOLUME)),
SWIPE_MAGNITUDE_THRESHOLD("revanced_swipe_threshold", INTEGER, 30,
SWIPE_MAGNITUDE_THRESHOLD("revanced_swipe_threshold", INTEGER, 30, true,
parents(SWIPE_BRIGHTNESS, SWIPE_VOLUME)),
SWIPE_OVERLAY_BACKGROUND_ALPHA("revanced_swipe_overlay_background_alpha", INTEGER, 127,
SWIPE_OVERLAY_BACKGROUND_ALPHA("revanced_swipe_overlay_background_alpha", INTEGER, 127, true,
parents(SWIPE_BRIGHTNESS, SWIPE_VOLUME)),
SWIPE_OVERLAY_TEXT_SIZE("revanced_swipe_text_overlay_size", INTEGER, 22,
SWIPE_OVERLAY_TEXT_SIZE("revanced_swipe_text_overlay_size", INTEGER, 22, true,
parents(SWIPE_BRIGHTNESS, SWIPE_VOLUME)),
SWIPE_OVERLAY_TIMEOUT("revanced_swipe_overlay_timeout", LONG, 500L,
SWIPE_OVERLAY_TIMEOUT("revanced_swipe_overlay_timeout", LONG, 500L, true,
parents(SWIPE_BRIGHTNESS, SWIPE_VOLUME)),
SWIPE_SAVE_AND_RESTORE_BRIGHTNESS("revanced_swipe_save_and_restore_brightness", BOOLEAN, TRUE, true,
parents(SWIPE_BRIGHTNESS, SWIPE_VOLUME)),
// Debugging
@@ -491,92 +498,16 @@ public enum SettingsEnum {
setting.load();
}
//
// TODO: eventually delete this
// renamed settings with new path names, but otherwise the new and old settings are identical
//
// TODO: eventually delete this.
// region Migration
SettingsEnum[][] renamedSettings = {
// TODO: do _not_ delete this SB private user id migration property until sometime in 2024.
// This is the only setting that cannot be reconfigured if lost,
// and more time should be given for users who rarely upgrade.
{DEPRECATED_SB_UUID_OLD_MIGRATION_SETTING, SB_PRIVATE_USER_ID},
// TODO: delete the rest of these migration settings. When to delete? Anytime.
{DEPRECATED_ADREMOVER_BUTTONED_REMOVAL, HIDE_BUTTONED_ADS},
{DEPRECATED_ADREMOVER_GENERAL_ADS_REMOVAL, HIDE_GENERAL_ADS},
{DEPRECATED_ADREMOVER_HIDE_LATEST_POSTS, HIDE_HIDE_LATEST_POSTS},
{DEPRECATED_ADREMOVER_PAID_CONTENT, HIDE_PAID_CONTENT},
{DEPRECATED_ADREMOVER_SELF_SPONSOR, HIDE_SELF_SPONSOR},
{DEPRECATED_REMOVE_VIDEO_ADS, HIDE_VIDEO_ADS},
{DEPRECATED_ADREMOVER_CUSTOM_ENABLED, CUSTOM_FILTER},
{DEPRECATED_ADREMOVER_CUSTOM_REMOVAL, CUSTOM_FILTER_STRINGS},
{DEPRECATED_HIDE_CHANNEL_MEMBER_SHELF, HIDE_CHANNEL_MEMBER_SHELF},
{DEPRECATED_HIDE_CHAPTER_TEASER, HIDE_CHAPTER_TEASER},
{DEPRECATED_HIDE_COMMUNITY_GUIDELINES, HIDE_COMMUNITY_GUIDELINES},
{DEPRECATED_HIDE_COMMUNITY_POSTS, HIDE_COMMUNITY_POSTS},
{DEPRECATED_HIDE_COMPACT_BANNER, HIDE_COMPACT_BANNER},
{DEPRECATED_HIDE_EMERGENCY_BOX, HIDE_EMERGENCY_BOX},
{DEPRECATED_HIDE_FEED_SURVEY_REMOVAL, HIDE_FEED_SURVEY},
{DEPRECATED_HIDE_GRAY_SEPARATOR, HIDE_GRAY_SEPARATOR},
{DEPRECATED_HIDE_HIDE_CHANNEL_GUIDELINES, HIDE_HIDE_CHANNEL_GUIDELINES},
{DEPRECATED_HIDE_INFO_PANEL_REMOVAL, HIDE_HIDE_INFO_PANELS},
{DEPRECATED_HIDE_MEDICAL_PANEL_REMOVAL, HIDE_MEDICAL_PANELS},
{DEPRECATED_HIDE_MERCHANDISE_REMOVAL, HIDE_MERCHANDISE_BANNERS},
{DEPRECATED_HIDE_MOVIE_REMOVAL, HIDE_MOVIES_SECTION},
{DEPRECATED_HIDE_SUBSCRIBERS_COMMUNITY_GUIDELINES_REMOVAL, HIDE_SUBSCRIBERS_COMMUNITY_GUIDELINES},
{DEPRECATED_HIDE_VIEW_PRODUCTS, HIDE_PRODUCTS_BANNER},
{DEPRECATED_HIDE_WEB_SEARCH_RESULTS, HIDE_WEB_SEARCH_RESULTS},
{DEPRECATED_HIDE_SHORTS, HIDE_SHORTS},
{DEPRECATED_DISABLE_RESUMING_SHORTS_PLAYER, DISABLE_RESUMING_SHORTS_PLAYER},
{DEPRECATED_HIDE_INFO_CARDS, HIDE_INFO_CARDS},
{DEPRECATED_ETERNAL_DOWNLOADER, EXTERNAL_DOWNLOADER},
{DEPRECATED_EXTERNAL_DOWNLOADER_PACKAGE_NAME, EXTERNAL_DOWNLOADER_PACKAGE_NAME},
{DEPRECATED_COPY_VIDEO_URL, COPY_VIDEO_URL},
{DEPRECATED_COPY_VIDEO_URL_TIMESTAMP, COPY_VIDEO_URL_TIMESTAMP},
{DEPRECATED_SHOW_OLD_VIDEO_MENU, SHOW_OLD_VIDEO_MENU},
{DEPRECATED_VIDEO_QUALITY_DEFAULT_WIFI, VIDEO_QUALITY_DEFAULT_WIFI},
{DEPRECATED_VIDEO_QUALITY_DEFAULT_MOBILE, VIDEO_QUALITY_DEFAULT_MOBILE},
{DEPRECATED_PLAYBACK_SPEED_DEFAULT, PLAYBACK_SPEED_DEFAULT},
{DEPRECATED_AUTO_CAPTIONS, AUTO_CAPTIONS},
{DEPRECATED_PLAYER_POPUP_PANELS, PLAYER_POPUP_PANELS},
{DEPRECATED_SWIPE_BRIGHTNESS, SWIPE_BRIGHTNESS},
{DEPRECATED_SWIPE_VOLUME, SWIPE_VOLUME},
{DEPRECATED_PRESS_TO_SWIPE, SWIPE_PRESS_TO_ENGAGE},
{DEPRECATED_SWIPE_HAPTIC_FEEDBACK, SWIPE_HAPTIC_FEEDBACK},
{DEPRECATED_DEBUG, DEBUG},
{DEPRECATED_DEBUG_STACKTRACE, DEBUG_STACKTRACE},
{DEPRECATED_DEBUG_TOAST_ON_ERROR, DEBUG_TOAST_ON_ERROR},
{DEPRECATED_EXTERNAL_BROWSER, EXTERNAL_BROWSER},
{DEPRECATED_AUTO_REPEAT, AUTO_REPEAT},
{DEPRECATED_TAP_SEEKING, SEEKBAR_TAPPING},
{DEPRECATED_HDR_AUTO_BRIGHTNESS, HDR_AUTO_BRIGHTNESS},
{DEPRECATED_RYD_USER_ID, RYD_USER_ID},
{DEPRECATED_RYD_DISLIKE_PERCENTAGE, RYD_DISLIKE_PERCENTAGE},
{DEPRECATED_RYD_COMPACT_LAYOUT, RYD_COMPACT_LAYOUT},
{DEPRECATED_SB_ENABLED, SB_ENABLED},
{DEPRECATED_SB_VOTING_BUTTON, SB_VOTING_BUTTON},
{DEPRECATED_SB_CREATE_NEW_SEGMENT, SB_CREATE_NEW_SEGMENT},
{DEPRECATED_SB_COMPACT_SKIP_BUTTON, SB_COMPACT_SKIP_BUTTON},
{DEPRECATED_SB_MIN_DURATION, SB_SEGMENT_MIN_DURATION},
{DEPRECATED_SB_VIDEO_LENGTH_WITHOUT_SEGMENTS, SB_VIDEO_LENGTH_WITHOUT_SEGMENTS},
{DEPRECATED_SB_API_URL, SB_API_URL},
{DEPRECATED_SB_TOAST_ON_SKIP, SB_TOAST_ON_SKIP},
{DEPRECATED_SB_AUTO_HIDE_SKIP_BUTTON, SB_AUTO_HIDE_SKIP_BUTTON},
{DEPRECATED_SB_TRACK_SKIP_COUNT, SB_TRACK_SKIP_COUNT},
{DEPRECATED_SB_ADJUST_NEW_SEGMENT_STEP, SB_CREATE_NEW_SEGMENT_STEP},
{DEPRECATED_SB_LAST_VIP_CHECK, SB_LAST_VIP_CHECK},
{DEPRECATED_SB_IS_VIP, SB_USER_IS_VIP},
{DEPRECATED_SB_LOCAL_TIME_SAVED_NUMBER_SEGMENTS, SB_LOCAL_TIME_SAVED_NUMBER_SEGMENTS},
{DEPRECATED_SB_LOCAL_TIME_SAVED_MILLISECONDS, SB_LOCAL_TIME_SAVED_MILLISECONDS},
};
for (SettingsEnum[] oldNewSetting : renamedSettings) {
SettingsEnum oldSetting = oldNewSetting[0];
SettingsEnum newSetting = oldNewSetting[1];
@@ -588,9 +519,8 @@ public enum SettingsEnum {
oldSetting.saveValue(oldSetting.defaultValue); // reset old value
}
}
//
// TODO end
//
// endregion
}
private void load() {

View File

@@ -45,7 +45,7 @@ class SwipeControlsConfigurationProvider(
*/
val overwriteVolumeKeyControls: Boolean
get() = isFullscreenVideo && enableVolumeControls
//endregioin
//endregion
//region gesture adjustments
/**
@@ -94,5 +94,15 @@ class SwipeControlsConfigurationProvider(
val overlayForegroundColor: Int
get() = Color.WHITE
//endregion
//region behaviour
/**
* should the brightness be saved and restored when exiting or entering fullscreen
*/
val shouldSaveAndRestoreBrightness: Boolean
get() = SettingsEnum.SWIPE_SAVE_AND_RESTORE_BRIGHTNESS.boolean
//endregion
}

View File

@@ -168,13 +168,14 @@ class SwipeControlsHostActivity : Activity() {
* @param type the new player type
*/
private fun onPlayerTypeChanged(type: PlayerType) {
when (type) {
PlayerType.WATCH_WHILE_FULLSCREEN -> screen?.restore()
else -> {
screen?.save()
screen?.restoreDefaultBrightness()
if (config.shouldSaveAndRestoreBrightness)
when (type) {
PlayerType.WATCH_WHILE_FULLSCREEN -> screen?.restore()
else -> {
screen?.save()
screen?.restoreDefaultBrightness()
}
}
}
}
/**

View File

@@ -0,0 +1,23 @@
package app.revanced.reddit.patches;
import com.reddit.domain.model.ILink;
import java.util.ArrayList;
import java.util.List;
public final class FilterPromotedLinksPatch {
/**
* Filters list from promoted links.
**/
public static List<?> filterChildren(final Iterable<?> links) {
final List<Object> filteredList = new ArrayList<>();
for (Object item : links) {
if (item instanceof ILink && ((ILink) item).getPromoted()) continue;
filteredList.add(item);
}
return filteredList;
}
}

View File

@@ -1,25 +0,0 @@
package app.revanced.reddit.patches;
import app.revanced.integrations.utils.LogHelper;
import java.net.MalformedURLException;
import java.net.URL;
public final class SanitizeUrlQueryPatch {
/**
* Strip query parameters from a given URL string.
*
* @param urlString URL string to strip query parameters from.
* @return URL string without query parameters if possible, otherwise the original string.
*/
public static String stripQueryParameters(final String urlString) {
try {
final var url = new URL(urlString);
return url.getProtocol() + "://" + url.getHost() + url.getPath();
} catch (MalformedURLException e) {
LogHelper.printException(() -> "Can not parse URL", e);
return urlString;
}
}
}

View File

@@ -1,4 +1,3 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
@@ -7,9 +6,6 @@ buildscript {
dependencies {
classpath("com.android.tools.build:gradle:8.0.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

View File

@@ -0,0 +1,7 @@
package com.reddit.domain.model;
public class ILink {
public boolean getPromoted() {
throw new UnsupportedOperationException("Stub");
}
}

View File

@@ -1,3 +1,3 @@
org.gradle.jvmargs = -Xmx2048m
android.useAndroidX = true
version = 0.109.0-dev.2
version = 0.111.2-dev.2