Initial commit
Tento commit je obsažen v:
3
.gitignore
vendorováno
Normální soubor
3
.gitignore
vendorováno
Normální soubor
@ -0,0 +1,3 @@
|
|||||||
|
.DS_Store
|
||||||
|
.theos
|
||||||
|
packages
|
||||||
13
Makefile
Normální soubor
13
Makefile
Normální soubor
@ -0,0 +1,13 @@
|
|||||||
|
export ARCHS = armv7 arm64 arm64e
|
||||||
|
|
||||||
|
PACKAGE_VERSION = 1.0.0
|
||||||
|
|
||||||
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|
||||||
|
TWEAK_NAME = YTCastConfirm
|
||||||
|
YTCastConfirm_FILES = Tweak.xm
|
||||||
|
|
||||||
|
include $(THEOS_MAKE_PATH)/tweak.mk
|
||||||
|
|
||||||
|
after-install::
|
||||||
|
install.exec "killall -9 SpringBoard"
|
||||||
37
Tweak.xm
Normální soubor
37
Tweak.xm
Normální soubor
@ -0,0 +1,37 @@
|
|||||||
|
%hook MDXPlaybackRouteButtonController
|
||||||
|
|
||||||
|
-(void)didPressButton:(id)arg1 {
|
||||||
|
|
||||||
|
UIAlertController* alertController = [%c(UIAlertController) alertControllerWithTitle:@"Casting"
|
||||||
|
message:@"Are you sure you want to start casting?"
|
||||||
|
preferredStyle:UIAlertControllerStyleAlert];
|
||||||
|
|
||||||
|
UIAlertAction* defaultAction = [%c(UIAlertAction) actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
|
||||||
|
%orig;
|
||||||
|
}];
|
||||||
|
|
||||||
|
UIAlertAction* noButton = [%c(UIAlertAction)
|
||||||
|
actionWithTitle:@"Cancel"
|
||||||
|
style:UIAlertActionStyleDefault
|
||||||
|
handler: ^(UIAlertAction * action) {
|
||||||
|
return;
|
||||||
|
}];
|
||||||
|
|
||||||
|
|
||||||
|
[alertController addAction:defaultAction];
|
||||||
|
[alertController addAction:noButton];
|
||||||
|
|
||||||
|
id rootViewController = [%c(UIApplication) sharedApplication].delegate.window.rootViewController;
|
||||||
|
if([rootViewController isKindOfClass:[%c(UINavigationController) class]]) {
|
||||||
|
rootViewController = ((UINavigationController *)rootViewController).viewControllers.firstObject;
|
||||||
|
}
|
||||||
|
if([rootViewController isKindOfClass:[%c(UITabBarController) class]]) {
|
||||||
|
rootViewController = ((UITabBarController *)rootViewController).selectedViewController;
|
||||||
|
}
|
||||||
|
if ([rootViewController presentedViewController] != nil) {
|
||||||
|
rootViewController = [rootViewController presentedViewController];
|
||||||
|
}
|
||||||
|
[rootViewController presentViewController:alertController animated:YES completion:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
%end
|
||||||
1
YTCastConfirm.plist
Normální soubor
1
YTCastConfirm.plist
Normální soubor
@ -0,0 +1 @@
|
|||||||
|
{ Filter = { Bundles = ( "com.google.ios.youtube" ); }; }
|
||||||
9
control
Normální soubor
9
control
Normální soubor
@ -0,0 +1,9 @@
|
|||||||
|
Package: com.devvix.ytcastconfirm
|
||||||
|
Name: YTCastConfirm
|
||||||
|
Depends: mobilesubstrate
|
||||||
|
Version: 1.0.0
|
||||||
|
Architecture: iphoneos-arm
|
||||||
|
Description: An awesome MobileSubstrate tweak!
|
||||||
|
Maintainer: Devvix
|
||||||
|
Author: Devvix
|
||||||
|
Section: Tweaks
|
||||||
Odkázat v novém úkolu
Zablokovat Uživatele