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

Compare commits

...

46 Commits

Author SHA1 Message Date
semantic-release-bot
fb1a69a7ba chore(release): 0.99.0-dev.2 [skip ci]
# [0.99.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.99.0-dev.1...v0.99.0-dev.2) (2023-02-23)

### Features

* **youtube/general-ads:** hide quick actions in fullscreen ([ae862cb](ae862cbac6))
* **youtube/general-ads:** hide related videos in quick action ([cfc571c](cfc571c12c))
2023-02-23 12:33:42 +00:00
oSumAtrIX
cfc571c12c feat(youtube/general-ads): hide related videos in quick action
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-23 13:31:15 +01:00
oSumAtrIX
ae862cbac6 feat(youtube/general-ads): hide quick actions in fullscreen
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-23 13:30:49 +01:00
oSumAtrIX
178b90b490 ci: fix backmerge direction
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-22 16:40:05 +01:00
semantic-release-bot
4b052b19a3 chore(release): 0.99.0-dev.1 [skip ci]
# [0.99.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.98.0...v0.99.0-dev.1) (2023-02-22)

### Features

* **youtube:** remove patch `open-links-directly` ([dce882b](dce882b128))
2023-02-22 15:37:04 +00:00
oSumAtrIX
dce882b128 feat(youtube): remove patch open-links-directly
The patch did not serve any real purpose

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-22 16:23:06 +01:00
semantic-release-bot
ccb5d81d46 chore(release): 0.98.0 [skip ci]
# [0.98.0](https://github.com/revanced/revanced-integrations/compare/v0.97.0...v0.98.0) (2023-02-22)

### Bug Fixes

* remove nullable annotation in Kotlin code ([b5a29fd](b5a29fdce1))
* **twitter:** make `hide-ads` patch compatible with any version ([6655988](665598836a))
* **youtube/hide-watch-in-vr:** fix descriptions ([96fcc0b](96fcc0b1c7))

### Features

* **twitter:** `hide-recommended-users` patch ([96eea3d](96eea3d4fc))
* **youtube/general-ads:** hide channel bar ([35c4266](35c4266e8b))
* **youtube/general-ads:** hide full-screen feed banner ([da1572c](da1572c28d))
* **youtube/general-ads:** hide horizontal video shelf ([fd975ec](fd975ecd2a))
* **youtube/open-links-directly:** skip every redirect url ([2d73b8b](2d73b8b29b))
2023-02-22 05:51:41 +00:00
oSumAtrIX
5ed7170018 chore: merge branch dev to main (#321) 2023-02-22 06:49:37 +01:00
oSumAtrIX
621ef63d86 ci: add backmerge target branch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-22 06:45:15 +01:00
semantic-release-bot
37c0cc04c4 chore(release): 0.98.0-dev.5 [skip ci]
# [0.98.0-dev.5](https://github.com/revanced/revanced-integrations/compare/v0.98.0-dev.4...v0.98.0-dev.5) (2023-02-22)

### Features

* **youtube/open-links-directly:** skip every redirect url ([2d73b8b](2d73b8b29b))
2023-02-22 05:11:24 +00:00
oSumAtrIX
5749a1dd65 refactor(youtube/hide-info-cards): fix casing
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-22 06:09:37 +01:00
oSumAtrIX
2d73b8b29b feat(youtube/open-links-directly): skip every redirect url
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-22 06:09:36 +01:00
semantic-release-bot
85cae1e5d6 chore(release): 0.98.0-dev.4 [skip ci]
# [0.98.0-dev.4](https://github.com/revanced/revanced-integrations/compare/v0.98.0-dev.3...v0.98.0-dev.4) (2023-02-22)

### Bug Fixes

* remove nullable annotation in Kotlin code ([b5a29fd](b5a29fdce1))
2023-02-22 04:44:49 +00:00
oSumAtrIX
b5a29fdce1 fix: remove nullable annotation in Kotlin code
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-22 05:42:37 +01:00
semantic-release-bot
1809d1bbf9 chore(release): 0.98.0-dev.3 [skip ci]
# [0.98.0-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.98.0-dev.2...v0.98.0-dev.3) (2023-02-22)

### Bug Fixes

* **twitter:** make `hide-ads` patch compatible with any version ([6655988](665598836a))

### Features

* **twitter:** `hide-recommended-users` patch ([96eea3d](96eea3d4fc))
2023-02-22 04:40:57 +00:00
oSumAtrIX
96eea3d4fc feat(twitter): hide-recommended-users patch
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-22 05:38:27 +01:00
oSumAtrIX
665598836a fix(twitter): make hide-ads patch compatible with any version
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-22 05:38:26 +01:00
oSumAtrIX
f1e6cbcdf1 chore: update dependencies
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-22 05:33:42 +01:00
oSumAtrIX
24d7e47844 ci: use new semantic-release-backmerge option
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-20 05:25:02 +01:00
semantic-release-bot
f6573521ba chore(release): 0.98.0-dev.2 [skip ci]
# [0.98.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.98.0-dev.1...v0.98.0-dev.2) (2023-02-20)

### Bug Fixes

* **youtube/hide-watch-in-vr:** fix descriptions ([96fcc0b](96fcc0b1c7))

### Features

* **youtube/general-ads:** hide channel bar ([35c4266](35c4266e8b))
* **youtube/general-ads:** hide horizontal video shelf ([fd975ec](fd975ecd2a))
2023-02-20 04:18:21 +00:00
oSumAtrIX
c320384066 refactor(youtube): remove dead code
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-20 05:16:20 +01:00
oSumAtrIX
45c3f6e774 refactor(youtube): separate patches into two
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-20 05:16:20 +01:00
oSumAtrIX
e040b7de2f refactor(youtube/general-ads): correct settings name
Syncing with 1a96d79356e0432cfcf6287cdebbad8227eef6d1 from revanced-patches

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-20 05:16:19 +01:00
oSumAtrIX
96fcc0b1c7 fix(youtube/hide-watch-in-vr): fix descriptions
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-20 05:16:19 +01:00
oSumAtrIX
35c4266e8b feat(youtube/general-ads): hide channel bar
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-20 05:16:19 +01:00
oSumAtrIX
fd975ecd2a feat(youtube/general-ads): hide horizontal video shelf
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-20 05:16:18 +01:00
semantic-release-bot
a857b9db6f chore(release): 0.98.0-dev.1 [skip ci]
# [0.98.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.97.0...v0.98.0-dev.1) (2023-02-18)

### Features

* **youtube/general-ads:** hide full-screen feed banner ([da1572c](da1572c28d))
2023-02-18 21:09:33 +00:00
oSumAtrIX
39e3d046f3 chore: merge branch main to dev 2023-02-18 22:06:55 +01:00
oSumAtrIX
da1572c28d feat(youtube/general-ads): hide full-screen feed banner
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-18 22:00:44 +01:00
semantic-release-bot
3f5e27d6b1 chore(release): 0.97.0 [skip ci]
# [0.97.0](https://github.com/revanced/revanced-integrations/compare/v0.96.2...v0.97.0) (2023-02-14)

### Bug Fixes

* **youtube/general-ads:** block other kind of survey ([cdf43ef](cdf43efcf2))

### Features

* **youtube/general-ads:** hide web search results ([9df1e46](9df1e460c5))
2023-02-14 14:02:41 +00:00
oSumAtrIX
3e113b6ab0 chore: merge branch dev to main (#320) 2023-02-14 15:00:30 +01:00
semantic-release-bot
0904f3c78a chore(release): 0.97.0-dev.1 [skip ci]
# [0.97.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.96.2...v0.97.0-dev.1) (2023-02-14)

### Bug Fixes

* **youtube/general-ads:** block other kind of survey ([cdf43ef](cdf43efcf2))

### Features

* **youtube/general-ads:** hide web search results ([9df1e46](9df1e460c5))
2023-02-14 13:59:04 +00:00
oSumAtrIX
9df1e460c5 feat(youtube/general-ads): hide web search results
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-14 14:56:47 +01:00
oSumAtrIX
cdf43efcf2 fix(youtube/general-ads): block other kind of survey 2023-02-14 14:56:47 +01:00
semantic-release-bot
370f331330 chore(release): 0.96.2 [skip ci]
## [0.96.2](https://github.com/revanced/revanced-integrations/compare/v0.96.1...v0.96.2) (2023-02-13)

### Bug Fixes

* **youtube/general-ads:** do not hide chapters when hiding preview comments ([cfb7aab](cfb7aab779))
* **youtube/general-ads:** use correct setting for `BlockRule` ([#316](https://github.com/revanced/revanced-integrations/issues/316)) ([7225bc3](7225bc3c48))
2023-02-13 21:44:11 +00:00
oSumAtrIX
622aa1dcaa chore: merge branch dev to main (#319) 2023-02-13 22:41:31 +01:00
semantic-release-bot
5071082fde chore(release): 0.96.2-dev.2 [skip ci]
## [0.96.2-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.96.2-dev.1...v0.96.2-dev.2) (2023-02-13)

### Bug Fixes

* **youtube/general-ads:** do not hide chapters when hiding preview comments ([cfb7aab](cfb7aab779))
2023-02-13 21:35:24 +00:00
oSumAtrIX
71b558ba6a ci: update dependencies and target node version (#318) 2023-02-13 22:32:29 +01:00
Palm
9cea77ac59 ci: fix step name typo 2023-02-13 20:56:56 +07:00
Palm
b47b7cbc22 ci: target specific node version 2023-02-13 10:45:17 +07:00
Palm
25d51179cc ci: update dependencies 2023-02-13 10:44:45 +07:00
Palm
2e0758b3c8 ci: do not override dependency versions on install 2023-02-13 10:44:07 +07:00
oSumAtrIX
85bf637078 chore: merge branch dev to main (#317) 2023-02-13 03:36:08 +01:00
oSumAtrIX
cfb7aab779 fix(youtube/general-ads): do not hide chapters when hiding preview comments
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-13 03:31:01 +01:00
semantic-release-bot
0def31b2dd chore(release): 0.96.2-dev.1 [skip ci]
## [0.96.2-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.96.1...v0.96.2-dev.1) (2023-02-11)

### Bug Fixes

* **youtube/general-ads:** use correct setting for `BlockRule` ([#316](https://github.com/revanced/revanced-integrations/issues/316)) ([7225bc3](7225bc3c48))
2023-02-11 13:51:25 +00:00
johnconner122
7225bc3c48 fix(youtube/general-ads): use correct setting for BlockRule (#316) 2023-02-11 14:49:33 +01:00
27 changed files with 1500 additions and 280 deletions

View File

@@ -3,7 +3,7 @@ name: Release
on:
workflow_dispatch:
push:
branches:
branches:
- main
- dev
pull_request:
@@ -16,7 +16,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- name: Cancel previou runs
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
- name: Checkout
uses: actions/checkout@v3
@@ -33,11 +33,11 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "latest"
node-version: "18"
cache: 'npm'
- name: Setup semantic-release
run: npm install semantic-release@19.0.5 @saithodev/semantic-release-backmerge @semantic-release/git @semantic-release/changelog gradle-semantic-release-plugin@1.7.4 -D
run: npm install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
run: npx semantic-release
run: npm exec semantic-release

View File

@@ -34,7 +34,7 @@
[
"@saithodev/semantic-release-backmerge",
{
branches: [{from: "main", to: "dev"}],
backmergeBranches: [{"from": "main", "to": "dev"}],
clearWorkspace: true
}
]

View File

@@ -1,3 +1,128 @@
# [0.99.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.99.0-dev.1...v0.99.0-dev.2) (2023-02-23)
### Features
* **youtube/general-ads:** hide quick actions in fullscreen ([ae862cb](https://github.com/revanced/revanced-integrations/commit/ae862cbac6f9a9b717617469d202b48923a1d3b4))
* **youtube/general-ads:** hide related videos in quick action ([cfc571c](https://github.com/revanced/revanced-integrations/commit/cfc571c12cb012b86c8bfa8bf7df1c77b9711a21))
# [0.99.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.98.0...v0.99.0-dev.1) (2023-02-22)
### Features
* **youtube:** remove patch `open-links-directly` ([dce882b](https://github.com/revanced/revanced-integrations/commit/dce882b12809c074ae796b3551ddd82806bd084d))
# [0.98.0](https://github.com/revanced/revanced-integrations/compare/v0.97.0...v0.98.0) (2023-02-22)
### Bug Fixes
* remove nullable annotation in Kotlin code ([b5a29fd](https://github.com/revanced/revanced-integrations/commit/b5a29fdce195ab47edd61d1d684def1ac919297c))
* **twitter:** make `hide-ads` patch compatible with any version ([6655988](https://github.com/revanced/revanced-integrations/commit/665598836abfcead9c5e68ce7831a4137465df39))
* **youtube/hide-watch-in-vr:** fix descriptions ([96fcc0b](https://github.com/revanced/revanced-integrations/commit/96fcc0b1c70c277c99a99db9ca2d50f649a41a70))
### Features
* **twitter:** `hide-recommended-users` patch ([96eea3d](https://github.com/revanced/revanced-integrations/commit/96eea3d4fc096f389840481b146dcf1542cb9c43))
* **youtube/general-ads:** hide channel bar ([35c4266](https://github.com/revanced/revanced-integrations/commit/35c4266e8b8ad7cf9fb5d14cf6cbc8ae65cc78df))
* **youtube/general-ads:** hide full-screen feed banner ([da1572c](https://github.com/revanced/revanced-integrations/commit/da1572c28d20e2549d0e2a68591f23bb68d8cc9c))
* **youtube/general-ads:** hide horizontal video shelf ([fd975ec](https://github.com/revanced/revanced-integrations/commit/fd975ecd2a91ea7ac713d3b7badf373c7d53ad5c))
* **youtube/open-links-directly:** skip every redirect url ([2d73b8b](https://github.com/revanced/revanced-integrations/commit/2d73b8b29b14ab9ce20fa33ea4ebfa66984c5903))
# [0.98.0-dev.5](https://github.com/revanced/revanced-integrations/compare/v0.98.0-dev.4...v0.98.0-dev.5) (2023-02-22)
### Features
* **youtube/open-links-directly:** skip every redirect url ([2d73b8b](https://github.com/revanced/revanced-integrations/commit/2d73b8b29b14ab9ce20fa33ea4ebfa66984c5903))
# [0.98.0-dev.4](https://github.com/revanced/revanced-integrations/compare/v0.98.0-dev.3...v0.98.0-dev.4) (2023-02-22)
### Bug Fixes
* remove nullable annotation in Kotlin code ([b5a29fd](https://github.com/revanced/revanced-integrations/commit/b5a29fdce195ab47edd61d1d684def1ac919297c))
# [0.98.0-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.98.0-dev.2...v0.98.0-dev.3) (2023-02-22)
### Bug Fixes
* **twitter:** make `hide-ads` patch compatible with any version ([6655988](https://github.com/revanced/revanced-integrations/commit/665598836abfcead9c5e68ce7831a4137465df39))
### Features
* **twitter:** `hide-recommended-users` patch ([96eea3d](https://github.com/revanced/revanced-integrations/commit/96eea3d4fc096f389840481b146dcf1542cb9c43))
# [0.98.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.98.0-dev.1...v0.98.0-dev.2) (2023-02-20)
### Bug Fixes
* **youtube/hide-watch-in-vr:** fix descriptions ([96fcc0b](https://github.com/revanced/revanced-integrations/commit/96fcc0b1c70c277c99a99db9ca2d50f649a41a70))
### Features
* **youtube/general-ads:** hide channel bar ([35c4266](https://github.com/revanced/revanced-integrations/commit/35c4266e8b8ad7cf9fb5d14cf6cbc8ae65cc78df))
* **youtube/general-ads:** hide horizontal video shelf ([fd975ec](https://github.com/revanced/revanced-integrations/commit/fd975ecd2a91ea7ac713d3b7badf373c7d53ad5c))
# [0.98.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.97.0...v0.98.0-dev.1) (2023-02-18)
### Features
* **youtube/general-ads:** hide full-screen feed banner ([da1572c](https://github.com/revanced/revanced-integrations/commit/da1572c28d20e2549d0e2a68591f23bb68d8cc9c))
# [0.97.0](https://github.com/revanced/revanced-integrations/compare/v0.96.2...v0.97.0) (2023-02-14)
### Bug Fixes
* **youtube/general-ads:** block other kind of survey ([cdf43ef](https://github.com/revanced/revanced-integrations/commit/cdf43efcf29a04b354313749057119e3de030cb1))
### Features
* **youtube/general-ads:** hide web search results ([9df1e46](https://github.com/revanced/revanced-integrations/commit/9df1e460c56bf0d5cb3c9d04853d07b22cef35bb))
# [0.97.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.96.2...v0.97.0-dev.1) (2023-02-14)
### Bug Fixes
* **youtube/general-ads:** block other kind of survey ([cdf43ef](https://github.com/revanced/revanced-integrations/commit/cdf43efcf29a04b354313749057119e3de030cb1))
### Features
* **youtube/general-ads:** hide web search results ([9df1e46](https://github.com/revanced/revanced-integrations/commit/9df1e460c56bf0d5cb3c9d04853d07b22cef35bb))
## [0.96.2](https://github.com/revanced/revanced-integrations/compare/v0.96.1...v0.96.2) (2023-02-13)
### Bug Fixes
* **youtube/general-ads:** do not hide chapters when hiding preview comments ([cfb7aab](https://github.com/revanced/revanced-integrations/commit/cfb7aab77991e8a123fb6956e699df8ad53bf59d))
* **youtube/general-ads:** use correct setting for `BlockRule` ([#316](https://github.com/revanced/revanced-integrations/issues/316)) ([7225bc3](https://github.com/revanced/revanced-integrations/commit/7225bc3c48b2d8f94d21b5481e37d78a26f49544))
## [0.96.2-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.96.2-dev.1...v0.96.2-dev.2) (2023-02-13)
### Bug Fixes
* **youtube/general-ads:** do not hide chapters when hiding preview comments ([cfb7aab](https://github.com/revanced/revanced-integrations/commit/cfb7aab77991e8a123fb6956e699df8ad53bf59d))
## [0.96.2-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.96.1...v0.96.2-dev.1) (2023-02-11)
### Bug Fixes
* **youtube/general-ads:** use correct setting for `BlockRule` ([#316](https://github.com/revanced/revanced-integrations/issues/316)) ([7225bc3](https://github.com/revanced/revanced-integrations/commit/7225bc3c48b2d8f94d21b5481e37d78a26f49544))
## [0.96.1](https://github.com/revanced/revanced-integrations/compare/v0.96.0...v0.96.1) (2023-02-11)

View File

@@ -1,6 +1,3 @@
import java.io.FileInputStream
import java.util.Properties
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
@@ -47,7 +44,7 @@ android {
dependencies {
compileOnly(project(mapOf("path" to ":dummy")))
compileOnly("androidx.annotation:annotation:1.5.0")
compileOnly("androidx.appcompat:appcompat:1.5.1")
compileOnly("androidx.appcompat:appcompat:1.6.1")
compileOnly("com.squareup.okhttp3:okhttp:5.0.0-alpha.11")
compileOnly("com.squareup.retrofit2:retrofit:2.9.0")
}

View File

@@ -9,7 +9,7 @@ final class CommentsPatch extends Filter {
var comments = new BlockRule(SettingsEnum.HIDE_COMMENTS_SECTION, "video_metadata_carousel", "_comments");
var previewComment = new BlockRule(
SettingsEnum.HIDE_PREVIEW_COMMENT,
"carousel_item",
"|carousel_item",
"comments_entry_point_teaser",
"comments_entry_point_simplebox"
);

View File

@@ -1,13 +1,10 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.settings.SettingsEnum;
public class FullscreenPanelsRemoverPatch {
public static int getFullscreenPanelsVisibility() {
return SettingsEnum.HIDE_FULLSCREEN_PANELS.getBoolean() ? View.GONE : View.VISIBLE;
}
}

View File

@@ -26,17 +26,21 @@ public final class GeneralAdsPatch extends Filter {
var subscribersCommunityGuidelines = new BlockRule(SettingsEnum.ADREMOVER_SUBSCRIBERS_COMMUNITY_GUIDELINES_REMOVAL, "sponsorships_comments_upsell");
var channelMemberShelf = new BlockRule(SettingsEnum.ADREMOVER_CHANNEL_MEMBER_SHELF_REMOVAL, "member_recognition_shelf");
var compactBanner = new BlockRule(SettingsEnum.ADREMOVER_COMPACT_BANNER_REMOVAL, "compact_banner");
var inFeedSurvey = new BlockRule(SettingsEnum.ADREMOVER_FEED_SURVEY_REMOVAL, "in_feed_survey");
var inFeedSurvey = new BlockRule(SettingsEnum.ADREMOVER_FEED_SURVEY_REMOVAL, "in_feed_survey", "slimline_survey");
var medicalPanel = new BlockRule(SettingsEnum.ADREMOVER_MEDICAL_PANEL_REMOVAL, "medical_panel");
var paidContent = new BlockRule(SettingsEnum.ADREMOVER_PAID_CONTENT_REMOVAL, "paid_content_overlay");
var merchandise = new BlockRule(SettingsEnum.ADREMOVER_MERCHANDISE_REMOVAL, "product_carousel");
var infoPanel = new BlockRule(SettingsEnum.ADREMOVER_INFO_PANEL_REMOVAL, "publisher_transparency_panel", "single_item_information_panel");
var latestPosts = new BlockRule(SettingsEnum.ADREMOVER_HIDE_LATEST_POSTS, "post_shelf");
var channelGuidelines = new BlockRule(SettingsEnum.ADREMOVER_HIDE_CHANNEL_GUIDELINES, "channel_guidelines_entry_banner");
var artistCard = new BlockRule(SettingsEnum.HIDE_ARTIST_CARD, "official_card");
var artistCard = new BlockRule(SettingsEnum.HIDE_ARTIST_CARDS, "official_card");
var selfSponsor = new BlockRule(SettingsEnum.ADREMOVER_SELF_SPONSOR_REMOVAL, "cta_shelf_card");
var chapterTeaser = new BlockRule(SettingsEnum.ADREMOVER_CHAPTER_TEASER_REMOVAL, "expandable_metadata");
var viewProducts = new BlockRule(SettingsEnum.ADREMOVER_GRAY_SEPARATOR, "product_item", "products_in_video");
var viewProducts = new BlockRule(SettingsEnum.ADREMOVER_VIEW_PRODUCTS, "product_item", "products_in_video");
var webLinkPanel = new BlockRule(SettingsEnum.ADREMOVER_WEB_SEARCH_RESULTS, "web_link_panel");
var horizontalVideoShelf = new BlockRule(SettingsEnum.ADREMOVER_HORIZONTAL_VIDEO_SHELF, "horizontal_video_shelf");
var channelBar = new BlockRule(SettingsEnum.ADREMOVER_CHANNEL_BAR, "channel_bar");
var relatedVideos = new BlockRule(SettingsEnum.ADREMOVER_CHANNEL_BAR, "fullscreen_related_videos");
var graySeparator = new BlockRule(SettingsEnum.ADREMOVER_GRAY_SEPARATOR,
"cell_divider" // layout residue (gray line above the buttoned ad),
);
@@ -52,7 +56,9 @@ public final class GeneralAdsPatch extends Filter {
"banner_text_icon",
"square_image_layout",
"watch_metadata_app_promo",
"video_display_full_layout"
"video_display_full_layout",
"hero_promo_image",
"statement_banner"
);
var movieAds = new BlockRule(
SettingsEnum.ADREMOVER_MOVIE_REMOVAL,
@@ -66,12 +72,14 @@ public final class GeneralAdsPatch extends Filter {
this.pathRegister.registerAll(
generalAds,
buttonedAd,
channelBar,
communityPosts,
paidContent,
latestPosts,
movieAds,
chapterTeaser,
communityGuidelines,
relatedVideos,
compactBanner,
inFeedSurvey,
viewProducts,
@@ -81,10 +89,13 @@ public final class GeneralAdsPatch extends Filter {
channelGuidelines,
artistCard,
selfSponsor,
webLinkPanel,
horizontalVideoShelf,
subscribersCommunityGuidelines,
channelMemberShelf
);
var quickActions = new BlockRule(SettingsEnum.ADREMOVER_CHANNEL_BAR, "quick_actions");
var carouselAd = new BlockRule(SettingsEnum.ADREMOVER_GENERAL_ADS_REMOVAL,
"carousel_ad"
);
@@ -98,6 +109,7 @@ public final class GeneralAdsPatch extends Filter {
this.identifierRegister.registerAll(
shorts,
graySeparator,
quickActions,
carouselAd
);
}

View File

@@ -1,16 +1,15 @@
package app.revanced.integrations.patches;
import android.view.View;
import app.revanced.integrations.settings.SettingsEnum;
public class HideInfocardsPatch {
public static void hideInfocardsIncognito(View view) {
public class HideInfoCardsPatch {
public static void hideInfoCardsIncognito(View view) {
if (!SettingsEnum.HIDE_INFO_CARDS.getBoolean()) return;
view.setVisibility(View.GONE);
}
public static boolean hideInfocardsMethodCall() {
public static boolean hideInfoCardsMethodCall() {
return SettingsEnum.HIDE_INFO_CARDS.getBoolean();
}
}

View File

@@ -0,0 +1,9 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class HideSeekbarPatch {
public static boolean hideSeekbar() {
return SettingsEnum.HIDE_SEEKBAR.getBoolean();
}
}

View File

@@ -1,10 +0,0 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class HideTimeAndSeekbarPatch {
//Used by app.revanced.patches.youtube.layout.hidetimeandseekbar.patch.HideTimeAndSeekbarPatch
public static boolean hideTimeAndSeekbar() {
return SettingsEnum.HIDE_TIME_AND_SEEKBAR.getBoolean();
}
}

View File

@@ -0,0 +1,9 @@
package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class HideTimePatch {
public static boolean hideTime() {
return SettingsEnum.HIDE_TIME.getBoolean();
}
}

View File

@@ -2,9 +2,8 @@ package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum;
public class HideWatchinVRPatch {
//Used by app.revanced.patches.youtube.layout.watchinvr.patch.HideWatchinVRPatch
public static boolean hideWatchinVR() {
public class HideWatchInVRPatch {
public static boolean hideWatchInVR() {
return SettingsEnum.HIDE_WATCH_IN_VR.getBoolean();
}
}

View File

@@ -1,18 +0,0 @@
package app.revanced.integrations.patches;
import java.net.URLDecoder;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import app.revanced.integrations.settings.SettingsEnum;
public class OpenLinksDirectlyPatch {
public static String parseRedirectUri(String uri) {
if (SettingsEnum.OPEN_LINKS_DIRECTLY.getBoolean()) {
Matcher matcher = Pattern.compile("&q=(http.+?)&v=").matcher(uri);
return matcher.find() ? URLDecoder.decode(matcher.group(1)) : uri;
}
return uri;
}
}

View File

@@ -53,6 +53,11 @@ public enum SettingsEnum {
ADREMOVER_BUTTONED_REMOVAL("revanced_adremover_buttoned", true, ReturnType.BOOLEAN),
ADREMOVER_GRAY_SEPARATOR("revanced_adremover_separator", true, ReturnType.BOOLEAN),
ADREMOVER_VIEW_PRODUCTS("revanced_adremover_view_products", true, ReturnType.BOOLEAN),
ADREMOVER_WEB_SEARCH_RESULTS("revanced_adremover_web_search_result", true, ReturnType.BOOLEAN),
ADREMOVER_HORIZONTAL_VIDEO_SHELF("revanced_horizontal_video_shelf", true, ReturnType.BOOLEAN),
ADREMOVER_CHANNEL_BAR("revanced_hide_channel_bar", false, ReturnType.BOOLEAN),
ADREMOVER_QUICK_ACTIONS("revanced_hide_quick_actions", false, ReturnType.BOOLEAN),
ADREMOVER_RELATED_VIDEOS("revanced_hide_related_videos", false, ReturnType.BOOLEAN),
// Action buttons
HIDE_LIKE_BUTTON("revanced_hide_like_button", false, ReturnType.BOOLEAN, false),
@@ -69,7 +74,7 @@ public enum SettingsEnum {
SPOOF_APP_VERSION("revanced_spoof_app_version", false, ReturnType.BOOLEAN, true),
WIDE_SEARCHBAR("revanced_wide_searchbar", false, ReturnType.BOOLEAN, true),
HIDE_ALBUM_CARDS("revanced_hide_album_cards", false, ReturnType.BOOLEAN, true),
HIDE_ARTIST_CARD("revanced_hide_artist_card", false, ReturnType.BOOLEAN),
HIDE_ARTIST_CARDS("revanced_hide_artist_cards", false, ReturnType.BOOLEAN),
HIDE_AUTOPLAY_BUTTON("revanced_hide_autoplay_button", true, ReturnType.BOOLEAN, true),
HIDE_VIDEO_WATERMARK("revanced_hide_video_watermark", true, ReturnType.BOOLEAN),
HIDE_CAPTIONS_BUTTON("revanced_hide_captions_button", false, ReturnType.BOOLEAN),
@@ -86,7 +91,8 @@ public enum SettingsEnum {
HIDE_REEL_BUTTON("revanced_hide_reel_button", true, ReturnType.BOOLEAN, true),
HIDE_SHORTS_BUTTON("revanced_hide_shorts_button", true, ReturnType.BOOLEAN, true),
HIDE_SHORTS_COMMENTS_BUTTON("revanced_hide_shorts_comments_button", false, ReturnType.BOOLEAN),
HIDE_TIME_AND_SEEKBAR("revanced_hide_time_and_seekbar", false, ReturnType.BOOLEAN),
HIDE_TIME("revanced_hide_time", false, ReturnType.BOOLEAN),
HIDE_SEEKBAR("revanced_hide_seekbar", false, ReturnType.BOOLEAN),
HIDE_WATCH_IN_VR("revanced_hide_watch_in_vr", false, ReturnType.BOOLEAN, true),
HIDE_BREAKING_NEWS("revanced_hide_breaking_news", true, ReturnType.BOOLEAN, true),
HIDE_PLAYER_BUTTONS("revanced_hide_player_buttons", false, ReturnType.BOOLEAN, false),

View File

@@ -0,0 +1,9 @@
package app.revanced.twitter.patches.hook.json
import org.json.JSONObject
abstract class BaseJsonHook : JsonHook {
abstract fun apply(json: JSONObject)
override fun transform(json: JSONObject) = json.apply { apply(json) }
}

View File

@@ -0,0 +1,15 @@
package app.revanced.twitter.patches.hook.json
import app.revanced.twitter.patches.hook.patch.Hook
import org.json.JSONObject
interface JsonHook : Hook<JSONObject> {
/**
* Transform a JSONObject.
*
* @param json The JSONObject.
*/
fun transform(json: JSONObject): JSONObject
override fun hook(type: JSONObject) = transform(type)
}

View File

@@ -0,0 +1,28 @@
package app.revanced.twitter.patches.hook.json
import app.revanced.twitter.utils.json.JsonUtils.parseJson
import app.revanced.twitter.utils.stream.StreamUtils
import org.json.JSONException
import java.io.IOException
import java.io.InputStream
object JsonHookPatch {
private val hooks = buildList<JsonHook> {
// Modified by corresponding patch.
}
@JvmStatic
fun parseJsonHook(jsonInputStream: InputStream): InputStream {
var jsonObject = try {
parseJson(jsonInputStream)
} catch (ignored: IOException) {
return jsonInputStream // Unreachable.
} catch (ignored: JSONException) {
return jsonInputStream
}
for (hook in hooks) jsonObject = hook.hook(jsonObject)
return StreamUtils.fromString(jsonObject.toString())
}
}

View File

@@ -0,0 +1,9 @@
package app.revanced.twitter.patches.hook.patch
interface Hook<T> {
/**
* Hook the given type.
* @param type The type to hook
*/
fun hook(type: T): T
}

View File

@@ -0,0 +1,15 @@
package app.revanced.twitter.patches.hook.patch.ads
import app.revanced.twitter.patches.hook.json.BaseJsonHook
import app.revanced.twitter.patches.hook.twifucker.TwiFucker
import org.json.JSONObject
object AdsHook : BaseJsonHook() {
/**
* Strips JSONObject from promoted ads.
*
* @param json The JSONObject.
*/
override fun apply(json: JSONObject) = TwiFucker.hidePromotedAds(json)
}

View File

@@ -0,0 +1,15 @@
package app.revanced.twitter.patches.hook.patch.recommendation
import app.revanced.twitter.patches.hook.json.BaseJsonHook
import app.revanced.twitter.patches.hook.twifucker.TwiFucker
import org.json.JSONObject
object RecommendedUsersHook : BaseJsonHook() {
/**
* Strips JSONObject from recommended users.
*
* @param json The JSONObject.
*/
override fun apply(json: JSONObject) = TwiFucker.hideRecommendedUsers(json)
}

View File

@@ -0,0 +1,177 @@
package app.revanced.twitter.patches.hook.twifucker
import android.util.Log
import app.revanced.twitter.patches.hook.twifucker.TwiFuckerUtils.forEach
import app.revanced.twitter.patches.hook.twifucker.TwiFuckerUtils.forEachIndexed
import org.json.JSONArray
import org.json.JSONObject
// https://raw.githubusercontent.com/Dr-TSNG/TwiFucker/880cdf1c1622e54ab45561ffcb4f53d94ed97bae/app/src/main/java/icu/nullptr/twifucker/hook/JsonHook.kt
internal object TwiFucker {
// root
private fun JSONObject.jsonGetInstructions(): JSONArray? =
optJSONObject("timeline")?.optJSONArray("instructions")
private fun JSONObject.jsonGetData(): JSONObject? = optJSONObject("data")
private fun JSONObject.jsonHasRecommendedUsers(): Boolean = has("recommended_users")
private fun JSONObject.jsonRemoveRecommendedUsers() {
remove("recommended_users")
}
private fun JSONObject.jsonCheckAndRemoveRecommendedUsers() {
if (jsonHasRecommendedUsers()) {
Log.d("revanced", "Handle recommended users: $this")
jsonRemoveRecommendedUsers()
}
}
private fun JSONObject.jsonHasThreads(): Boolean = has("threads")
private fun JSONObject.jsonRemoveThreads() {
remove("threads")
}
private fun JSONObject.jsonCheckAndRemoveThreads() {
if (jsonHasThreads()) {
Log.d("revabced", "Handle threads: $this")
jsonRemoveThreads()
}
}
// data
private fun JSONObject.dataGetInstructions(): JSONArray? {
val timeline = optJSONObject("user_result")?.optJSONObject("result")
?.optJSONObject("timeline_response")?.optJSONObject("timeline")
?: optJSONObject("timeline_response")?.optJSONObject("timeline")
?: optJSONObject("timeline_response")
return timeline?.optJSONArray("instructions")
}
private fun JSONObject.dataCheckAndRemove() {
dataGetInstructions()?.forEach { instruction ->
instruction.instructionCheckAndRemove()
}
}
private fun JSONObject.dataGetLegacy(): JSONObject? =
optJSONObject("tweet_result")?.optJSONObject("result")?.let {
if (it.has("tweet")) {
it.optJSONObject("tweet")
} else {
it
}
}?.optJSONObject("legacy")
// entry
private fun JSONObject.entryHasPromotedMetadata(): Boolean =
optJSONObject("content")?.optJSONObject("item")?.optJSONObject("content")
?.optJSONObject("tweet")
?.has("promotedMetadata") == true || optJSONObject("content")?.optJSONObject("content")
?.has("tweetPromotedMetadata") == true || optJSONObject("item")?.optJSONObject("content")
?.has("tweetPromotedMetadata") == true
private fun JSONObject.entryGetContentItems(): JSONArray? =
optJSONObject("content")?.optJSONArray("items")
?: optJSONObject("content")?.optJSONObject("timelineModule")?.optJSONArray("items")
private fun JSONObject.entryIsTweetDetailRelatedTweets(): Boolean =
optString("entryId").startsWith("tweetdetailrelatedtweets-")
private fun JSONObject.entryGetTrends(): JSONArray? =
optJSONObject("content")?.optJSONObject("timelineModule")?.optJSONArray("items")
// trend
private fun JSONObject.trendHasPromotedMetadata(): Boolean =
optJSONObject("item")?.optJSONObject("content")?.optJSONObject("trend")
?.has("promotedMetadata") == true
private fun JSONArray.trendRemoveAds() {
val trendRemoveIndex = mutableListOf<Int>()
forEachIndexed { trendIndex, trend ->
if (trend.trendHasPromotedMetadata()) {
Log.d("revanced", "Handle trends ads $trendIndex $trend")
trendRemoveIndex.add(trendIndex)
}
}
for (i in trendRemoveIndex.asReversed()) {
remove(i)
}
}
// instruction
private fun JSONObject.instructionTimelineAddEntries(): JSONArray? = optJSONArray("entries")
private fun JSONObject.instructionGetAddEntries(): JSONArray? =
optJSONObject("addEntries")?.optJSONArray("entries")
private fun JSONObject.instructionCheckAndRemove() {
instructionTimelineAddEntries()?.entriesRemoveAnnoyance()
instructionGetAddEntries()?.entriesRemoveAnnoyance()
}
// entries
private fun JSONArray.entriesRemoveTimelineAds() {
val removeIndex = mutableListOf<Int>()
forEachIndexed { entryIndex, entry ->
entry.entryGetTrends()?.trendRemoveAds()
if (entry.entryHasPromotedMetadata()) {
Log.d("revanced", "Handle timeline ads $entryIndex $entry")
removeIndex.add(entryIndex)
}
val innerRemoveIndex = mutableListOf<Int>()
val contentItems = entry.entryGetContentItems()
contentItems?.forEachIndexed inner@{ itemIndex, item ->
if (item.entryHasPromotedMetadata()) {
Log.d("revanced", "Handle timeline replies ads $entryIndex $entry")
if (contentItems.length() == 1) {
removeIndex.add(entryIndex)
} else {
innerRemoveIndex.add(itemIndex)
}
return@inner
}
}
for (i in innerRemoveIndex.asReversed()) {
contentItems?.remove(i)
}
}
for (i in removeIndex.reversed()) {
remove(i)
}
}
private fun JSONArray.entriesRemoveTweetDetailRelatedTweets() {
val removeIndex = mutableListOf<Int>()
forEachIndexed { entryIndex, entry ->
if (entry.entryIsTweetDetailRelatedTweets()) {
Log.d("revanced", "Handle tweet detail related tweets $entryIndex $entry")
removeIndex.add(entryIndex)
}
}
for (i in removeIndex.reversed()) {
remove(i)
}
}
private fun JSONArray.entriesRemoveAnnoyance() {
entriesRemoveTimelineAds()
entriesRemoveTweetDetailRelatedTweets()
}
fun hideRecommendedUsers(json: JSONObject) {
json.jsonCheckAndRemoveRecommendedUsers()
}
fun hidePromotedAds(json: JSONObject) {
json.jsonGetInstructions()?.forEach { instruction ->
instruction.instructionCheckAndRemove()
}
json.jsonGetData()?.dataCheckAndRemove()
}
}

View File

@@ -0,0 +1,22 @@
package app.revanced.twitter.patches.hook.twifucker
import org.json.JSONArray
import org.json.JSONObject
internal object TwiFuckerUtils {
inline fun JSONArray.forEach(action: (JSONObject) -> Unit) {
(0 until this.length()).forEach { i ->
if (this[i] is JSONObject) {
action(this[i] as JSONObject)
}
}
}
inline fun JSONArray.forEachIndexed(action: (index: Int, JSONObject) -> Unit) {
(0 until this.length()).forEach { i ->
if (this[i] is JSONObject) {
action(i, this[i] as JSONObject)
}
}
}
}

View File

@@ -0,0 +1,13 @@
package app.revanced.twitter.utils.json
import app.revanced.twitter.utils.stream.StreamUtils
import org.json.JSONException
import org.json.JSONObject
import java.io.IOException
import java.io.InputStream
object JsonUtils {
@JvmStatic
@Throws(IOException::class, JSONException::class)
fun parseJson(jsonInputStream: InputStream) = JSONObject(StreamUtils.toString(jsonInputStream))
}

View File

@@ -0,0 +1,24 @@
package app.revanced.twitter.utils.stream
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.io.InputStream
object StreamUtils {
@Throws(IOException::class)
fun toString(inputStream: InputStream): String {
ByteArrayOutputStream().use { result ->
val buffer = ByteArray(1024)
var length: Int
while (inputStream.read(buffer).also { length = it } != -1) {
result.write(buffer, 0, length)
}
return result.toString()
}
}
fun fromString(string: String): InputStream {
return ByteArrayInputStream(string.toByteArray())
}
}

View File

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

1211
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,8 +1,9 @@
{
"devDependencies": {
"@saithodev/semantic-release-backmerge": "^3.1.0",
"@semantic-release/changelog": "^6.0.2",
"@semantic-release/git": "^10.0.1",
"gradle-semantic-release-plugin": "^1.7.4",
"semantic-release": "^19.0.5"
"gradle-semantic-release-plugin": "^1.7.6",
"semantic-release": "^20.1.0"
}
}