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

Compare commits

...

4 Commits

Author SHA1 Message Date
semantic-release-bot
7c2751956a chore(release): 0.97.0-dev.3 [skip ci]
# [0.97.0-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.97.0-dev.2...v0.97.0-dev.3) (2023-02-18)

### Features

* **youtube/open-links-directly:** skip every redirect url ([50a168e](50a168eadc))
2023-02-18 20:53:48 +00:00
oSumAtrIX
50a168eadc feat(youtube/open-links-directly): skip every redirect url
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-18 21:51:47 +01:00
semantic-release-bot
a58666d9c5 chore(release): 0.97.0-dev.2 [skip ci]
# [0.97.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.97.0-dev.1...v0.97.0-dev.2) (2023-02-15)

### Features

* **youtube/general-ads:** hide full-screen feed banner ([0cbcf41](0cbcf41aef))
2023-02-15 03:21:40 +00:00
oSumAtrIX
0cbcf41aef feat(youtube/general-ads): hide full-screen feed banner
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
2023-02-15 04:19:40 +01:00
4 changed files with 33 additions and 10 deletions

View File

@@ -1,3 +1,17 @@
# [0.97.0-dev.3](https://github.com/revanced/revanced-integrations/compare/v0.97.0-dev.2...v0.97.0-dev.3) (2023-02-18)
### Features
* **youtube/open-links-directly:** skip every redirect url ([50a168e](https://github.com/revanced/revanced-integrations/commit/50a168eadc98f7c1d7bee9a48d924905874ec8d8))
# [0.97.0-dev.2](https://github.com/revanced/revanced-integrations/compare/v0.97.0-dev.1...v0.97.0-dev.2) (2023-02-15)
### Features
* **youtube/general-ads:** hide full-screen feed banner ([0cbcf41](https://github.com/revanced/revanced-integrations/commit/0cbcf41aefb7df6836b8f44f093de6e30eac937e))
# [0.97.0-dev.1](https://github.com/revanced/revanced-integrations/compare/v0.96.2...v0.97.0-dev.1) (2023-02-14)

View File

@@ -53,7 +53,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,

View File

@@ -1,18 +1,25 @@
package app.revanced.integrations.patches;
import java.net.URLDecoder;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import android.net.Uri;
import app.revanced.integrations.settings.SettingsEnum;
public class OpenLinksDirectlyPatch {
private static final String YOUTUBE_REDIRECT_PATH = "redirect";
public static String parseRedirectUri(String uri) {
/**
* Transforms the given YouTube redirect uri by extracting the redirect query.
*
* @param uri The YouTube redirect uri.
* @return The redirect query.
*/
public static Uri transformRedirectUri(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;
final var parsed = Uri.parse(uri);
if (parsed.getPath().equals(YOUTUBE_REDIRECT_PATH))
Uri.parse(parsed.getQueryParameter("q"));
}
return uri;
return Uri.parse(uri);
}
}

View File

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