mirror of
https://github.com/revanced/revanced-integrations
synced 2024-11-22 05:02:19 +01:00
feat(YouTube): Add Spoof device dimensions
patch
This commit is contained in:
parent
c47fcde242
commit
16f1163a34
@ -0,0 +1,14 @@
|
||||
package app.revanced.integrations.patches.spoof;
|
||||
|
||||
import app.revanced.integrations.settings.SettingsEnum;
|
||||
|
||||
public class SpoofDeviceDimensionsPatch {
|
||||
private static final boolean SPOOF = SettingsEnum.SPOOF_DEVICE_DIMENSIONS.getBoolean();
|
||||
public static int getMinHeightOrWidth(int minHeightOrWidth) {
|
||||
return SPOOF ? 64 : minHeightOrWidth;
|
||||
}
|
||||
|
||||
public static int getMaxHeightOrWidth(int maxHeightOrWidth) {
|
||||
return SPOOF ? 4096 : maxHeightOrWidth;
|
||||
}
|
||||
}
|
@ -177,6 +177,7 @@ public enum SettingsEnum {
|
||||
"revanced_spoof_signature_verification_enabled_user_dialog_message"),
|
||||
SPOOF_SIGNATURE_IN_FEED("revanced_spoof_signature_in_feed_enabled", BOOLEAN, FALSE, false,
|
||||
parents(SPOOF_SIGNATURE)),
|
||||
SPOOF_DEVICE_DIMENSIONS("revanced_spoof_device_dimensions", BOOLEAN, FALSE, true),
|
||||
BYPASS_URL_REDIRECTS("revanced_bypass_url_redirects", BOOLEAN, TRUE),
|
||||
|
||||
// Swipe controls
|
||||
|
Loading…
Reference in New Issue
Block a user