mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-06-12 21:27:43 +02:00
chore: Update patches information (#126)
* ci: workflow to ping Discord users when patches are released (#72)
* init: Workflow to notify discord users of releases
* Rename workflow
* chore (Background playback): Shorten description
* Revert "chore (Background playback): Shorten description"
This reverts commit 10661b870f
.
* Change message contents
* chore: Update patches information
* feat: Apply code review suggestions
* feat: Apply code review suggestions
---------
Co-authored-by: KobeW50 <84587632+KobeW50@users.noreply.github.com>
Co-authored-by: inotia00 <108592928+inotia00@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
c1e0a74f16
commit
3283cf3e98
@ -1,14 +0,0 @@
|
||||
package app.revanced.extension.youtube.patches.misc;
|
||||
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class ExternalBrowserPatch {
|
||||
|
||||
public static String enableExternalBrowser(final String original) {
|
||||
if (!Settings.ENABLE_EXTERNAL_BROWSER.get())
|
||||
return original;
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
@ -10,9 +10,9 @@ import app.revanced.extension.youtube.settings.Settings;
|
||||
public class OpenLinksDirectlyPatch {
|
||||
private static final String YOUTUBE_REDIRECT_PATH = "/redirect";
|
||||
|
||||
public static Uri enableBypassRedirect(String uri) {
|
||||
public static Uri parseRedirectUri(String uri) {
|
||||
final Uri parsed = Uri.parse(uri);
|
||||
if (!Settings.ENABLE_OPEN_LINKS_DIRECTLY.get())
|
||||
if (!Settings.BYPASS_URL_REDIRECTS.get())
|
||||
return parsed;
|
||||
|
||||
if (Objects.equals(parsed.getPath(), YOUTUBE_REDIRECT_PATH)) {
|
||||
|
@ -0,0 +1,15 @@
|
||||
package app.revanced.extension.youtube.patches.misc;
|
||||
|
||||
import app.revanced.extension.youtube.settings.Settings;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class OpenLinksExternallyPatch {
|
||||
|
||||
// renamed from 'enableExternalBrowser'
|
||||
public static String openLinksExternally(final String original) {
|
||||
if (!Settings.OPEN_LINKS_EXTERNALLY.get())
|
||||
return original;
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
@ -550,8 +550,8 @@ public class Settings extends BaseSettings {
|
||||
|
||||
|
||||
// PreferenceScreen: Miscellaneous
|
||||
public static final BooleanSetting ENABLE_OPEN_LINKS_DIRECTLY = new BooleanSetting("revanced_enable_open_links_directly", TRUE);
|
||||
public static final BooleanSetting ENABLE_EXTERNAL_BROWSER = new BooleanSetting("revanced_enable_external_browser", TRUE, true);
|
||||
public static final BooleanSetting BYPASS_URL_REDIRECTS = new BooleanSetting("revanced_bypass_url_redirects", TRUE);
|
||||
public static final BooleanSetting OPEN_LINKS_EXTERNALLY = new BooleanSetting("revanced_open_links_externally", TRUE, true);
|
||||
|
||||
// Experimental Flags
|
||||
public static final BooleanSetting CHANGE_SHARE_SHEET = new BooleanSetting("revanced_change_share_sheet", FALSE, true);
|
||||
|
Reference in New Issue
Block a user