mirror of
https://github.com/revanced/revanced-integrations
synced 2024-11-22 05:02:19 +01:00
feat(youtube): remove patch open-links-directly
The patch did not serve any real purpose Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
ccb5d81d46
commit
dce882b128
@ -1,25 +0,0 @@
|
||||
package app.revanced.integrations.patches;
|
||||
|
||||
import android.net.Uri;
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class OpenLinksDirectlyPatch {
|
||||
private static final String YOUTUBE_REDIRECT_PATH = "redirect";
|
||||
|
||||
/**
|
||||
* Parses the given YouTube redirect uri by extracting the redirect query.
|
||||
*
|
||||
* @param uri The YouTube redirect uri.
|
||||
* @return The redirect query.
|
||||
*/
|
||||
public static Uri parseRedirectUri(String uri) {
|
||||
if (SettingsEnum.OPEN_LINKS_DIRECTLY.getBoolean()) {
|
||||
final var parsed = Uri.parse(uri);
|
||||
|
||||
if (parsed.getPath().equals(YOUTUBE_REDIRECT_PATH))
|
||||
Uri.parse(parsed.getQueryParameter("q"));
|
||||
}
|
||||
|
||||
return Uri.parse(uri);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user