Compare commits

...
Author SHA1 Message Date
qnblackcat 82de8d62ac v17.48.2-2.1 2022-12-12 09:28:46 +07:00
qnblackcat 881d6292aa Hide search ads by @PoomSmart 2022-12-12 09:28:11 +07:00
Nguyễn Đạt 1150659ea1 Merge pull request #754 from qnblackcat/3503754715
[Auto-generated] Submodule Updates 3503754715
2022-12-12 02:18:28 +07:00
github-actions a61882280e updating submodules 2022-12-11 19:17:36 +00:00
Nguyễn Đạt 5aec68985f Merge pull request #753 from qnblackcat/3503754715
[Auto-generated] Submodule Updates 3503754715
2022-12-12 00:57:51 +07:00
github-actions 37bbbbf369 updating submodules 2022-12-11 17:57:37 +00:00
Nguyễn Đạt 33deba766a Merge pull request #695 from olivertzeng/patch-1
update
2022-12-11 11:47:48 +07:00
Oliver Tzeng 1f3707a3f2 done 2022-12-11 11:20:06 +08:00
Nguyễn Đạt 396515d600 Merge pull request #747 from qnblackcat/3503754715
[Auto-generated] Submodule Updates 3503754715
2022-12-10 12:27:20 +07:00
github-actions a61405c3fb updating submodules 2022-12-10 05:25:59 +00:00
Nguyễn Đạt 76837d0ce7 Merge pull request #731 from qnblackcat/3503754715
[Auto-generated] Submodule Updates 3503754715
2022-12-04 21:05:19 +07:00
github-actions 5475c77d52 updating submodules 2022-12-04 14:04:25 +00:00
Nguyễn Đạt e81e6ff159 Merge pull request #723 from qnblackcat/3503754715
[Auto-generated] Submodule Updates 3503754715
2022-11-30 21:18:50 +07:00
github-actions d6694e4e14 updating submodules 2022-11-30 14:18:17 +00:00
qnblackcat 90cd7cd3dd improvements 2022-11-30 21:16:59 +07:00
Nguyễn Đạt dc53dd2578 Merge pull request #720 from yodaluca23/patch-2
Minor changes to bug template
2022-11-29 07:34:34 +07:00
Nguyễn Đạt bd37e43070 Update bug.md 2022-11-29 07:34:00 +07:00
Luca LeBlanc 544f6b57c4 Update bug.md 2022-11-28 18:20:30 -06:00
Luca LeBlanc 43984cc2a6 Minor changes to bug template
Minor changes to the bug template, including clarification of where the title goes as I have seen lots of people change the name of their issue after the original creation.
2022-11-28 17:40:22 -06:00
Nguyễn Đạt 5bfc931a02 Merge pull request #701 from arichorn/patch-1
Update buildapp.yml dependences
2022-11-26 19:35:38 +07:00
Aric 2e2c364b44 Update dependences
also removes Deprecation Errors
2022-11-23 13:55:32 -06:00
Nguyễn Đạt 3e63708ac8 Merge pull request #697 from qnblackcat/3503754715
[Auto-generated] Submodule Updates 3503754715
2022-11-19 20:45:25 +07:00
github-actions fd603e902c updating submodules 2022-11-19 13:44:58 +00:00
Oliver Tzeng f9de2d7b8d update
improvements
2022-11-19 09:52:42 +08:00
Nguyễn Đạt 49ace6eb4d Merge pull request #680 from therealFoxster/main
Update DontEatMyContent (v1.0.4 -> v1.0.5)
2022-11-16 06:39:17 +07:00
foxster-mp4 c42d2b85c9 Update DontEatMyContent (v1.0.4 -> v1.0.5)
Fix engagement panel layout in full screen (check when engagement panel is presented/dismissed and activate/deactivate tweak accordingly)

Use different (proper) method to detect new video played

Refactored
2022-11-15 10:48:36 -08:00
Nguyễn Đạt 880f92f2f6 Merge pull request #674 from qnblackcat/3272866751
[Auto-generated] Submodule Updates 3272866751
2022-11-14 20:58:55 +07:00
github-actions 4387a27214 updating submodules 2022-11-14 13:58:25 +00:00
qnblackcat aed43dc389 edit bundle name/ app name 2022-11-12 20:47:03 +07:00
Nguyễn Đạt 9edcd82315 Merge pull request #670 from therealFoxster/main
Update DontEatMyContent (1.0.3 -> 1.0.4)
2022-11-12 15:35:32 +07:00
foxster-mp4 acc86a1bf6 Update DontEatMyContent (1.0.3 -> 1.0.4)
Compatible with YouTube's pinch-to-zoom feature

Fix crash due to dangly constraint

Better zoomed-to-fill detection

Bye bye backwards compatibility (remove old code that was kept to support older YouTube versions)

Rename & add prefix to functions
2022-11-11 22:04:25 -08:00
Nguyễn Đạt 635b0673b4 Merge pull request #655 from dayanch96/patch-3
Change CastConfirm's alert to YTAlertView
2022-11-12 08:44:40 +07:00
Nguyễn Đạt 6b60f22eaf Update README.md 2022-11-07 21:44:31 +07:00
Nguyễn Đạt 65fd05f5db Update README.md 2022-11-07 21:43:12 +07:00
dayanch96 908caaf047 fixed bundle name 2022-11-07 04:28:16 +02:00
dayanch96 276ce261a5 Change CastConfirm's alert to YTAlertView 2022-11-07 04:25:53 +02:00
Nguyễn Đạt da03ae08a6 Merge pull request #652 from qnblackcat/3272866751
[Auto-generated] Submodule Updates 3272866751
2022-11-06 16:47:42 +07:00
github-actions 2f9b656acd updating submodules 2022-11-06 09:47:18 +00:00
Nguyễn Đạt 9c8486d017 No more hacky fix 2022-11-06 16:46:27 +07:00
qnblackcat e71069e678 fix compiling 2022-11-06 15:06:09 +07:00
qnblackcat 0e1e6d4396 v17.43.1-2.1 2022-11-06 11:22:41 +07:00
qnblackcat 6b3026159c clean up 2022-11-06 11:22:31 +07:00
qnblackcat 8aff0035ac Temporarily disable YTNoCheckLocalNetwork 2022-11-06 11:22:22 +07:00
qnblackcat b846e6e45e update Header.h 2022-11-06 11:22:04 +07:00
Nguyễn Đạt 679ea7046c Merge pull request #650 from qnblackcat/3272866751
[Auto-generated] Submodule Updates 3272866751
2022-11-05 20:51:19 +07:00
github-actions 53b5fde3b7 updating submodules 2022-11-05 13:51:09 +00:00
Nguyễn Đạt 2bd2174ffe Is this that hard to follow? 2022-11-05 17:12:54 +07:00
Nguyễn Đạt 79d9f0920c c‘mon Xcode 14, why don’t you just work!? 2022-11-04 15:40:21 +07:00
Nguyễn Đạt 3c252a79d1 Merge pull request #646 from therealFoxster/main
FIx typo in README.md
2022-11-04 15:38:46 +07:00
Foxster e3326f9adf FIx typo in README.md 2022-11-03 18:36:07 -07:00
Nguyễn Đạt 64bab9b6d5 Merge pull request #641 from 5jd/patch-1
Update French translation
2022-11-03 10:27:19 +07:00
Nguyễn Đạt 9ebbda2671 Merge pull request #643 from therealFoxster/main
Update DontEatMyContent to work with YouTube's redesign (1.0.2 -> 1.0.3)
2022-11-03 10:27:07 +07:00
foxster-mp4 6b62aca494 Update DontEatMyContent (1.0.2 -> 1.0.3)
Update to work with YouTube's redesign

Add another method to get video aspect ratio

Add another method to detect pinch gesture
2022-11-02 20:13:19 -07:00
5jd f4d400d059 Update French translation 2022-11-02 19:37:57 +01:00
qnblackcat 6efdf519f4 clean up 2022-11-02 16:38:03 +07:00
Nguyễn Đạt 684f542aca Merge pull request #636 from qnblackcat/3272866751
[Auto-generated] Submodule Updates 3272866751
2022-11-02 14:36:04 +07:00
github-actions d38993709e updating submodules 2022-11-02 07:35:32 +00:00
Nguyễn Đạt c5cdafd96f Merge pull request #629 from dayanch96/patch-2
Update ru
2022-10-31 18:22:43 +07:00
dayanch96 0635b3cfcf Upd 2022-10-31 00:28:16 +02:00
Nguyễn Đạt 50baafebce Merge pull request #623 from Yswag/main
update zh_tw translation
2022-10-29 21:43:27 +07:00
Yswag 4332070996 update strings 2022-10-29 13:48:37 +08:00
18 changed files with 432 additions and 231 deletions
+3 -3
View File
@@ -1,13 +1,13 @@
--- ---
name: Bug name: Bug
about: Make sure you complete the template. Otherwise, it will be closed without further explanation! about: Make sure you complete the template. Otherwise, it will be closed without further explanation!
title: "[Bug]" title: "[Bug] (Replace this with your title)"
labels: bug labels: bug
assignees: '' assignees: ''
--- ---
## ⚠️ Have you read the [FAQ](https://github.com/qnblackcat/uYouPlus/wiki/FAQ)? Make sure you visit the FAQ page first!!! ⚠️ ## ⚠️ Have you read the [FAQ](https://github.com/qnblackcat/uYouPlus/wiki/FAQ)? Make sure you visit the [FAQ](https://github.com/qnblackcat/uYouPlus/wiki/FAQ) page first!!! ⚠️
_Make sure you complete the template. Otherwise, it will be closed without further explanation!_ _Make sure you complete the template. Otherwise, it will be closed without further explanation!_
@@ -24,7 +24,7 @@ _Make sure you complete the template. Otherwise, it will be closed without furth
_(Please attach videos or screenshots if possible)_ _(Please attach videos or screenshots if possible)_
### Crash log (if possible) ### Crash log (if possible)
_(The crash log can be found in the Settings app > Privacy > Analytics & Improvements > Analytics Data > Youtube...)_ _(The crash log can be found in your device's Settings App > Privacy > Analytics & Improvements > Analytics Data > Youtube-xxx-xxx.ips)_
### Are you using the newest version of uYouPlus? If not, why? ### Are you using the newest version of uYouPlus? If not, why?
_(Developers spend time and effort to fix bugs & add improvements with every release. Why don't you update to the latest version before reporting about an issue???)_ _(Developers spend time and effort to fix bugs & add improvements with every release. Why don't you update to the latest version before reporting about an issue???)_
+2 -1
View File
@@ -7,7 +7,8 @@ assignees: ''
--- ---
## Have you read the FAQ? Make sure you visit the FAQ page before asking any question!!! ## Have you read the FAQ? Any questions that have been answered on the FAQ page will be closed without any explanation!
https://github.com/qnblackcat/uYouPlus/wiki/FAQ https://github.com/qnblackcat/uYouPlus/wiki/FAQ
### ###
+28 -13
View File
@@ -21,6 +21,16 @@ on:
default: "" default: ""
required: true required: true
type: string type: string
bundle_id:
description: "Modify the bundle ID. Not recommended"
default: "com.google.ios.youtube"
required: true
type: string
app_name:
description: "Modify the name of the app on the Home Screen. Not recommended"
default: "YouTube"
required: true
type: string
create_release: create_release:
description: "Create a draft release" description: "Create a draft release"
default: true default: true
@@ -34,7 +44,7 @@ concurrency:
jobs: jobs:
build: build:
name: Build uYouPlus name: Build uYouPlus
runs-on: macos-latest runs-on: macos-11
permissions: permissions:
contents: write contents: write
@@ -87,35 +97,40 @@ jobs:
env: env:
THEOS: ${{ github.workspace }}/theos THEOS: ${{ github.workspace }}/theos
- name: Download uYou & prepare YouTube iPA - name: Download uYou & Prepare YouTube iPA
run: | run: |
curl "https://raw.githubusercontent.com/Muirey03/RemoteLog/master/RemoteLog.h" --output "$THEOS/include/RemoteLog.h" curl "https://raw.githubusercontent.com/Muirey03/RemoteLog/master/RemoteLog.h" --output "$THEOS/include/RemoteLog.h"
curl "https://miro92.com/repo/debs/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb" --output "./main/Tweaks/uYou/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb" curl "https://miro92.com/repo/debs/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb" --output "main/Tweaks/uYou/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb"
wget "$YOUTUBE_URL" --no-verbose -O ./main/YouTube.ipa wget "$YOUTUBE_URL" --no-verbose -O main/YouTube.ipa
dpkg-deb -x "./main/Tweaks/uYou/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb" ./main/Tweaks/uYou/ dpkg-deb -x "main/Tweaks/uYou/com.miro.uyou_${{ env.UYOU_VERSION }}_iphoneos-arm.deb" main/Tweaks/uYou/
unzip -q ./main/YouTube.ipa -d ./main/tmp unzip -q main/YouTube.ipa -d main/tmp
rm -rf ./main/tmp/Payload/YouTube.app/PlugIns/* rm -rf main/tmp/Payload/YouTube.app/PlugIns/*
cp -R ./main/Extensions/*.appex ./main/tmp/Payload/YouTube.app/PlugIns cp -R main/Extensions/*.appex main/tmp/Payload/YouTube.app/PlugIns
env: env:
THEOS: ${{ github.workspace }}/theos THEOS: ${{ github.workspace }}/theos
UYOU_VERSION: ${{ inputs.uyou_version }} UYOU_VERSION: ${{ inputs.uyou_version }}
YOUTUBE_URL: ${{ inputs.decrypted_youtube_url }} YOUTUBE_URL: ${{ inputs.decrypted_youtube_url }}
- name: Fix compiling && Build Package - name: Fix compiling & Build Package
id: build_package id: build_package
run: | run: |
(echo 'THEOS_IGNORE_PARALLEL_BUILDING_NOTICE = yes' >> ~/.theosrc) (echo 'THEOS_IGNORE_PARALLEL_BUILDING_NOTICE = yes' >> ~/.theosrc)
cd ${{ github.workspace }}/main cd ${{ github.workspace }}/main
(cd ${{ github.workspace }}/main/Tweaks/YouPiP && sed -i '' "14s/$/ AVFoundation UIKit/" Makefile) sed -i '' "12s#.*#BUNDLE_ID = ${{ env.BUNDLE_ID }}#g" Makefile
(cd ${{ github.workspace }}/main/Tweaks/YTABConfig && sed -i '' "12s#.*#YTABConfig_FRAMEWORKS = UIKit#g" Makefile) sed -i '' "11s#.*#DISPLAY_NAME = ${{ env.APP_NAME }}#g" Makefile
make package FINALPACKAGE=1 make package FINALPACKAGE=1
(mv "packages/$(ls -t packages | head -n1)" "packages/uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }}.ipa") (mv "packages/$(ls -t packages | head -n1)" "packages/uYouPlus_${{ env.YOUTUBE_VERSION }}_${{ env.UYOU_VERSION }}.ipa")
echo "package=$(ls -t packages | head -n1)" >>$GITHUB_OUTPUT echo "package=$(ls -t packages | head -n1)" >>$GITHUB_OUTPUT
echo -e "==> \033[1mSHASUM256: $(shasum -a 256 packages/*.ipa | cut -f1 -d' ')\033[0m"
echo -e "==> \033[1mBundle ID: ${{ env.BUNDLE_ID }}\033[0m"
env: env:
THEOS: ${{ github.workspace }}/theos THEOS: ${{ github.workspace }}/theos
UYOU_VERSION: ${{ inputs.uyou_version }} UYOU_VERSION: ${{ inputs.uyou_version }}
YOUTUBE_VERSION: ${{ inputs.youtube_version }} YOUTUBE_VERSION: ${{ inputs.youtube_version }}
BUNDLE_ID: ${{ inputs.bundle_id }}
APP_NAME: ${{ inputs.app_name }}
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
@@ -129,7 +144,7 @@ jobs:
- name: Create Release - name: Create Release
id: create_release id: create_release
uses: softprops/action-gh-release@v0.1.14 uses: softprops/action-gh-release@v0.1.15
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UYOU_VERSION: ${{ inputs.uyou_version }} UYOU_VERSION: ${{ inputs.uyou_version }}
@@ -138,5 +153,5 @@ jobs:
with: with:
tag_name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }}) tag_name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }})
name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }}) name: v${{ env.YOUTUBE_VERSION }}-${{ env.UYOU_VERSION }}-(${{ github.run_number }})
files: ./main/packages/*.ipa files: main/packages/*.ipa
draft: ${{ env.DRAFT }} draft: ${{ env.DRAFT }}
+25 -14
View File
@@ -4,8 +4,8 @@
#define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil] #define LOC(x) [tweakBundle localizedStringForKey:x value:nil table:nil]
#define YT_BUNDLE_ID @"com.google.ios.youtube" #define YT_BUNDLE_ID @"com.google.ios.youtube"
#define YT_NAME @"YouTube" #define YT_NAME @"YouTube"
#define UNSUPPORTED_DEVICES @[@"iPhone14,3", @"iPhone14,6", @"iPhone14,8"] // DontEatMycontent #define DEMC_UNSUPPORTED_DEVICES @[@"iPhone14,3", @"iPhone14,6", @"iPhone14,8"] // DontEatMycontent
#define THRESHOLD 1.99 // DontEatMycontent #define DEMC_THRESHOLD 1.99 // DontEatMycontent
#define DEFAULT_RATE 2.0f // YTSpeed #define DEFAULT_RATE 2.0f // YTSpeed
// IAmYouTube // IAmYouTube
@@ -42,25 +42,33 @@
@end @end
// DontEatMyContent // DontEatMyContent
NSString* deviceName(); BOOL DEMC_deviceIsSupported();
BOOL isDeviceSupported(); void DEMC_activate();
void activate(); void DEMC_deactivate();
void deactivate(); void DEMC_centerRenderingView();
void center();
@interface YTPlayerView : UIView @interface YTPlayerView : UIView
- (BOOL)zoomToFill;
- (id)renderingView; - (id)renderingView;
- (id)playerView;
@end
@interface MLHAMSBDLSampleBufferRenderingView : UIView
@end @end
@interface YTMainAppVideoPlayerOverlayViewController : UIViewController @interface YTMainAppVideoPlayerOverlayViewController : UIViewController
- (BOOL)isFullscreen; - (BOOL)isFullscreen;
- (id)videoPlayerOverlayView; @end
- (id)activeVideoPlayerOverlay;
@interface HAMSBDLSampleBufferRenderingView : UIView
@end
@interface MLHAMSBDLSampleBufferRenderingView : HAMSBDLSampleBufferRenderingView
@end
@interface YTMainAppEngagementPanelViewController : UIViewController
- (BOOL)isLandscapeEngagementPanel;
- (BOOL)isPeekingSupported;
@end
@interface YTEngagementPanelContainerViewController : UIViewController
- (BOOL)isLandscapeEngagementPanel;
- (BOOL)isPeekingSupported;
@end @end
// YTSpeed // YTSpeed
@@ -129,6 +137,9 @@ void center();
@end @end
// OLED Darkmode // OLED Darkmode
@interface ELMView : UIView
@end
@interface ASWAppSwitcherCollectionViewCell : UIView @interface ASWAppSwitcherCollectionViewCell : UIView
@end @end
+2 -2
View File
@@ -5,7 +5,7 @@ ARCHS = arm64
MODULES = jailed MODULES = jailed
FINALPACKAGE = 1 FINALPACKAGE = 1
CODESIGN_IPA = 0 CODESIGN_IPA = 0
PACKAGE_VERSION = 17.42.7_2.1 PACKAGE_VERSION = 17.48.2_2.1
TWEAK_NAME = uYouPlus TWEAK_NAME = uYouPlus
DISPLAY_NAME = YouTube DISPLAY_NAME = YouTube
@@ -13,7 +13,7 @@ BUNDLE_ID = com.google.ios.youtube
uYouPlus_INJECT_DYLIBS = Tweaks/uYou/Library/MobileSubstrate/DynamicLibraries/uYou.dylib .theos/obj/libcolorpicker.dylib .theos/obj/iSponsorBlock.dylib .theos/obj/YTUHD.dylib .theos/obj/YouPiP.dylib .theos/obj/YouTubeDislikesReturn.dylib .theos/obj/YTABConfig.dylib uYouPlus_INJECT_DYLIBS = Tweaks/uYou/Library/MobileSubstrate/DynamicLibraries/uYou.dylib .theos/obj/libcolorpicker.dylib .theos/obj/iSponsorBlock.dylib .theos/obj/YTUHD.dylib .theos/obj/YouPiP.dylib .theos/obj/YouTubeDislikesReturn.dylib .theos/obj/YTABConfig.dylib
uYouPlus_FILES = uYouPlus.xm Settings.xm uYouPlus_FILES = uYouPlus.xm Settings.xm
uYouPlus_IPA = ./tmp/Payload/YouTube.app uYouPlus_IPA = tmp/Payload/YouTube.app
uYouPlus_FRAMEWORKS = UIKit Security uYouPlus_FRAMEWORKS = UIKit Security
uYouPlus_CFLAGS = -fobjc-arc -DTWEAK_VERSION=$(PACKAGE_VERSION) uYouPlus_CFLAGS = -fobjc-arc -DTWEAK_VERSION=$(PACKAGE_VERSION)
+130 -34
View File
@@ -1,4 +1,28 @@
![IMG_2196](https://user-images.githubusercontent.com/52943116/189822859-8a0952db-9264-4b5b-9cbe-d0a87b2db5a0.PNG) ![IMG_2196](https://user-images.githubusercontent.com/52943116/189822859-8a0952db-9264-4b5b-9cbe-d0a87b2db5a0.PNG)
***
<p align="center">
<img src="https://img.shields.io/badge/Platform-iOS%20%7C%20iPadOS%2014.0%2B-yellow" alt="Badge"/>
<a href="https://github.com/qnblackcat/uYouPlus/wiki/FAQ"><img src="https://img.shields.io/badge/Question%3F-FAQ-yellow" alt="Badge"></img></a>
<a href="https://github.com/qnblackcat/uYouPlus/wiki/FAQ"><img src="https://custom-icon-badges.demolab.com/badge/translate-blue.svg?logo=translate&logoColor=white" alt="Badge"></img></a>
</p>
<p align="center">
<a href="https://github.com/qnblackcat/uYouPlus/release/latest"><img src="https://custom-icon-badges.demolab.com/github/v/release/qnblackcat/uYouPlus?color=brightgreen&label=Latest%20release" alt="Badge"></img></a>
<a href="https://github.com/qnblackcat/uYouPlus/releases/latest"><img src="https://img.shields.io/github/downloads/qnblackcat/uYouPlus/total?label=Download" alt="Badge"></img></a>
<a href="https://github.com/qnblackcat/uYouPlus/commit"><img src="https://custom-icon-badges.demolab.com/github/last-commit/qnblackcat/uYouPlus?logo=history&logoColor=white&label=Last commit" alt="Badge"></img></a>
<a href="https://github.com/qnblackcat/uYouPlus/issues"><img src="https://custom-icon-badges.demolab.com/github/issues-raw/qnblackcat/uYouPlus?logo=issue-opened&label=Issues" alt="Badge"></img></a>
</p>
<p align="center">
<img src="https://img.shields.io/github/stars/qnblackcat/uYouPlus?style=social" alt="Badge"/>
<img src="https://img.shields.io/github/forks/qnblackcat/uYouPlus?style=social" alt="Badge"/>
<a href="https://github.com/qnblackcat/uYouPlus#support-the-developers"><img src="https://img.shields.io/badge/-Support-lightgrey?style=social&logo=paypal" alt="Badge"></img></a>
</p>
# Table of Contents # Table of Contents
@@ -12,30 +36,102 @@
* [Building](#building-optional) * [Building](#building-optional)
# Credits # Credits
- Special thanks to all the developers who have contributed to uYouPlus!
- [MiRO92](https://twitter.com/miro92) for [uYou](https://github.com/MiRO92/uYou-for-YouTube). <table id='credit'>
<tr>
- [Galactic-Dev](https://github.com/Galactic-Dev) and [Luewii](https://github.com/Luewii) for [iSponsorBlock](https://github.com/Galactic-Dev/iSponsorBlock) and [BigYTMiniPlayer](https://github.com/Galactic-Dev/BigYTMiniPlayer). <td id='miro92'>
<a href='https://github.com/MiRO92'>
- [HASHBANG Productions](https://github.com/hbang) for [Alderis Color Picker](https://github.com/hbang/Alderis) - a dependency of iSponsorBlock. <img src='https://github.com/MiRO92.png' width='140px;'>
</a>
- [PoomSmart](https://twitter.com/poomsmart) - the developer of many tweaks used by uYouPlus, see [Version info - Download](#download) for more details. <h4 align='center'><a href='https://twitter.com/miro92'>MiRO92</a></h4>
</td>
- [level3tjg](https://twitter.com/level3tjg) for [YTNoHoverCards](https://github.com/level3tjg/YTNoHoverCards), [YTMiniplayerEnabler](https://github.com/level3tjg/YTMiniplayerEnabler) and many hot patches for uYou. <td id='poomsmart'>
<a href='https://github.com/PoomSmart'>
- [BandarHL](https://twitter.com/bandarhl) for a bunch of improvements. <img src='https://github.com/PoomSmart.png' width='140px;'>
</a>
- [Julioverne](https://twitter.com/ijulioverne) for the solution to skip Google's safety warning when logging in. <h4 align='center'><a href='https://twitter.com/poomsmart'>PoomSmart</a></h4>
</td>
- [Lyvendia](https://github.com/Lyvendia/) for [YTSpeed](https://github.com/Lyvendia/YTSpeed/) <td id='level3tjg'>
<a href='https://github.com/level3tjg'>
- [therealFoxster](https://github.com/therealFoxster) for [DontEatMyContent](https://github.com/therealFoxster/DontEatMyContent). <img src='https://github.com/level3tjg.png' width='140px;'>
</a>
- [YouTube Extensions](https://github.com/CokePokes/YoutubeExtensions) by [CokePokes](https://github.com/CokePokes/). <h4 align='center'><a href='https://twitter.com/level3tjg'>level3tjg</a></h4>
</td>
- [theos team](https://github.com/theos/theos) for theos & theos-jailed. <td id='bandarHL'>
<a href='https://github.com/BandarHL'>
- Thanks to all the translators who have contributed to uYouPlus. Your contribution is highly appreciated! <img src='https://github.com/BandarHL.png' width='140px;'>
</a>
<h4 align='center'><a href='https://twitter.com/bandarhl'>BandarHelal</a></h4>
</td>
<td id='galactic-dev'>
<a href='https://github.com/Galactic-Dev'>
<img src='https://github.com/Galactic-Dev.png' width='140px;'>
</a>
<h4 align='center'><a href='https://twitter.com/dev_galactic'>galactic</a></h4>
</td>
</tr>
<tr>
<td id='julioverne'>
<a href='https://github.com/julioverne'>
<img src='https://github.com/julioverne.png' width='140px;'>
</a>
<h4 align='center'><a href='https://twitter.com/ijulioverne'>julioverne</a></h4>
</td>
<td id='hbang'>
<a href='https://github.com/hbang'>
<img src='https://github.com/hbang.png' width='140px;'>
</a>
<h4 align='center'><a href='https://twitter.com/hashbang'>HASHBANG</a></h4>
</td>
<td id='lyvendia'>
<a href='https://github.com/Lyvendia'>
<img src='https://github.com/Lyvendia.png' width='140px;'>
</a>
<h4 align='center'><a href='https://github.com/Lyvendia'>Lyvendia</a></h4>
</td>
<td id='foxster'>
<a href='https://github.com/therealFoxster'>
<img src='https://github.com/therealFoxster.png' width='140px;'>
</a>
<h4 align='center'><a href='https://twitter.com/therealFoxster'>Foxster</a></h4>
</td>
<td id='ichitaso'>
<a href='https://github.com/ichitaso'>
<img src='https://github.com/ichitaso.png' width='140px;'>
</a>
<h4 align='center'><a href='https://twitter.com/ichitaso'>ichitaso</a></h4>
</td>
</tr>
<tr>
<td id='ahmed-bafkir'>
<a href='https://github.com/AhmedBafkir'>
<img src='https://github.com/AhmedBafkir.png' width='140px;'>
</a>
<h4 align='center'><a href='https://twitter.com/Peaceful_0'>Ahmed Bafkir</a></h4>
</td>
<td id='cokepokes'>
<a href='https://github.com/CokePokes'>
<img src='https://github.com/CokePokes.png' width='140px;'>
</a>
<h4 align='center'><a href='https://twitter.com/cokepokes'>CokePokes</a></h4>
</td>
<td id='isnackable'>
<a href='https://github.com/ISnackable'>
<img src='https://github.com/ISnackable.png' width='140px;'>
</a>
<h4 align='center'><a href='https://isnackable.me/'>Tommy Teo</a></h4>
</td>
<td id='theos-team'>
<a href='https://github.com/theos/theos'>
<img src='https://github.com/theos.png' width='140px;'>
</a>
<h4 align='center'><a href='https://theos.dev'>theos</a></h4>
</td>
</tr>
</table>
# Features # Features
@@ -60,7 +156,7 @@
9. **YouRememberCaption**: make YouTube remember your video caption setting (if not already). 9. **YouRememberCaption**: make YouTube remember your video caption setting (if not already).
10. **NoYTPremium**: remove YouTube Premium upshells. 10. **NoYTPremium**: remove YouTube Premium upsells.
11. **YTSpeed**: add 2.25, 2.5, 2.75, and 3x playback speed 11. **YTSpeed**: add 2.25, 2.5, 2.75, and 3x playback speed
@@ -88,43 +184,43 @@
- My official AltStore repo: https://qnblackcat.github.io/AltStore/ - My official AltStore repo: https://qnblackcat.github.io/AltStore/
- [Open in AltStore (v17.42.7-2.1)](https://tinyurl.com/4j5nyb6z) - It will take a while to install because AltStore needs to download the IPA. - [Open in AltStore (v17.48.2-2.1)](https://tinyurl.com/59kjzeth) - It will take a while to install because AltStore needs to download the IPA first.
- Version info: _(last update: Oct 28)_ - Version info: _(last update: Dec 12)_
<details> <details>
<summary>Expand</summary> <summary>Expand </summary>
| **Tweaks/App** | **Developer** | **Version** | **Open source** | | **Tweaks/App** | **Developer** | **Version** | **Open source** |
| - | - | :-: | :-: | | - | - | :-: | :-: |
| **YouTube** | Google Inc | 17.42.7 | ✖︎ | | **YouTube** | Google Inc | 17.48.2 | ✖︎ |
| [uYou](https://github.com/MiRO92/uYou-for-YouTube) | [MiRO92](https://twitter.com/miro92) | 2.1 | ✖︎ | | [uYou](https://github.com/MiRO92/uYou-for-YouTube) | [MiRO92](https://twitter.com/miro92) | 2.1 | ✖︎ |
| [Open in YouTube](https://github.com/CokePokes/YoutubeExtensions) | [CokePokes](https://github.com/CokePokes) | 1.2 | ✖︎ | | [Open in YouTube](https://github.com/CokePokes/YoutubeExtensions) | [CokePokes](https://github.com/CokePokes) | 1.2 | ✖︎ |
| **iSponsorBlock** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.0-15 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) | | **iSponsorBlock** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.0-15 | [✔︎](https://github.com/Galactic-Dev/iSponsorBlock) |
| **BigYTMiniPlayer** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.0-1 | [✔︎](https://github.com/Galactic-Dev/BigYTMiniPlayer) | | **BigYTMiniPlayer** | [Galactic-Dev](https://github.com/Galactic-Dev) | 1.0-1 | [✔︎](https://github.com/Galactic-Dev/BigYTMiniPlayer) |
| **YTNoHoverCards** | [level3tjg](https://twitter.com/level3tjg) | 0.0.3 | [✔︎](https://github.com/level3tjg/YTNoHoverCards) | | **YTNoHoverCards** | [level3tjg](https://twitter.com/level3tjg) | 0.0.3 | [✔︎](https://github.com/level3tjg/YTNoHoverCards) |
| **YTMiniplayerEnabler** | [level3tjg](https://twitter.com/level3tjg) | 0.0.2 | [✔︎](https://github.com/level3tjg/YTMiniplayerEnabler) | | **YTMiniplayerEnabler** | [level3tjg](https://twitter.com/level3tjg) | 0.0.2 | [✔︎](https://github.com/level3tjg/YTMiniplayerEnabler) |
| **DontEatMyContent** | [therealFoxster](https://github.com/therealFoxster) | 1.0.2 | [✔︎](https://github.com/therealFoxster/DontEatMyContent) | | **DontEatMyContent** | [therealFoxster](https://github.com/therealFoxster) | 1.0.5 | [✔︎](https://github.com/therealFoxster/DontEatMyContent) |
| **YTSpeed** | [Lyvendia](https://github.com/Lyvendia) | 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed) | | **YTSpeed** | [Lyvendia](https://github.com/Lyvendia) | 1.0.1 | [✔︎](https://github.com/Lyvendia/YTSpeed) |
| **YTCastConfirm** | [JamieBerghmans](https://github.com/JamieBerghmans) | 1.0.0 | [✔︎](https://github.com/JamieBerghmans/YTCastConfirm) | | **YTCastConfirm** | [JamieBerghmans](https://github.com/JamieBerghmans) | 1.0.0 | [✔︎](https://github.com/JamieBerghmans/YTCastConfirm) |
| **Alderis Color Picker** | [HASHBANG Productions](https://github.com/hbang) | 1.2| [✔︎](https://github.com/hbang/Alderis) | | **Alderis Color Picker** | [HASHBANG Productions](https://github.com/hbang) | 1.2| [✔︎](https://github.com/hbang/Alderis) |
| **YTUHD** | [PoomSmart](https://twitter.com/poomsmart) | 1.3.4 | [✔︎](https://github.com/PoomSmart/YTUHD) | | **YTUHD** | [PoomSmart](https://twitter.com/poomsmart) | 1.3.4-2 | [✔︎](https://github.com/PoomSmart/YTUHD) |
| **YouPiP** | [PoomSmart](https://twitter.com/poomsmart) | 1.7.14 | [✔︎](https://github.com/PoomSmart/YouPiP) | | **YouPiP** | [PoomSmart](https://twitter.com/poomsmart) | 1.7.15-2 | [✔︎](https://github.com/PoomSmart/YouPiP) |
| **IAmYouTube** | [PoomSmart](https://twitter.com/poomsmart) | 1.2.0 | [✔︎](https://github.com/PoomSmart/IAmYouTube) | | **IAmYouTube** | [PoomSmart](https://twitter.com/poomsmart) | 1.2.0 | [✔︎](https://github.com/PoomSmart/IAmYouTube) |
| **YTABConfig** | [PoomSmart](https://twitter.com/poomsmart) | 1.4.2 | [✔︎](https://github.com/PoomSmart/YTABConfig) | | **YTABConfig** | [PoomSmart](https://twitter.com/poomsmart) | 1.4.6 | [✔︎](https://github.com/PoomSmart/YTABConfig) |
| **YTReExplore** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTReExplore) | | **YTReExplore** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTReExplore) |
| **NoYTPremium** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.4 | [✔︎](https://github.com/PoomSmart/NoYTPremium) | | **NoYTPremium** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.4 | [✔︎](https://github.com/PoomSmart/NoYTPremium) |
| **YTNoPaidPromo** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.0 | [✔︎](https://github.com/PoomSmart/YTNoPaidPromo) | | **YTNoPaidPromo** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.0 | [✔︎](https://github.com/PoomSmart/YTNoPaidPromo) |
| **YTAutoFullScreen** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.3 | [✔︎](https://github.com/PoomSmart/YTAutoFullScreen) | | **YTAutoFullScreen** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.3 | [✔︎](https://github.com/PoomSmart/YTAutoFullScreen) |
| **YTShortsProgress** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTShortsProgress) | | **YTShortsProgress** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.2 | [✔︎](https://github.com/PoomSmart/YTShortsProgress) |
| **YouRememberCaption** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/youremembercaption.html) | | **YouRememberCaption** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.0 | [✔︎](https://poomsmart.github.io/repo/depictions/youremembercaption.html) |
| **Return YouTube Dislike** | [PoomSmart](https://twitter.com/poomsmart) | 1.7.3 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) | | **Return YouTube Dislike** | [PoomSmart](https://twitter.com/poomsmart) | 1.9.0 | [✔︎](https://github.com/PoomSmart/Return-YouTube-Dislikes) |
| **YTNoCheckLocalNetwork** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.2 | [✔︎](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html) | | **YTNoCheckLocalNetwork** | [PoomSmart](https://twitter.com/poomsmart) | 1.0.2 | [✔︎](https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html) |
</details> </details>
# Installation # Installation
See [Installation - Wiki](https://github.com/qnblackcat/uYouPlus/wiki/Installation) See [Installation - Wiki](https://github.com/qnblackcat/uYouPlus/wiki/Installation).
# Support the developers # Support the developers
- [**MiRO92**](https://twitter.com/miro92): https://github.com/MiRO92/uYou-for-YouTube#support - [**MiRO92**](https://twitter.com/miro92): https://github.com/MiRO92/uYou-for-YouTube#support
+15 -12
View File
@@ -22,31 +22,34 @@ else
fi fi
# Makefile # Makefile
if [ -d ./tmp ] if [ -d tmp ]
then then
rm -rf ./tmp rm -rf tmp
fi fi
read -e -p "==> Path to the decrypted YouTube.ipa or YouTube.app: " PATHTOYT read -e -p "==> Path to the decrypted YouTube.ipa or YouTube.app: " PATHTOYT
if [[ $PATHTOYT == *.ipa ]] if [[ $PATHTOYT == *.ipa ]]
then then
unzip -q "$PATHTOYT" -d ./tmp unzip -q "$PATHTOYT" -d tmp
rm -rf ./tmp/Payload/YouTube.app/PlugIns/*.appex rm -rf tmp/Payload/YouTube.app/_CodeSignature/CodeResources
rm -rf tmp/Payload/YouTube.app/PlugIns/*.appex
cp -R Extensions/*.appex tmp/Payload/YouTube.app/PlugIns cp -R Extensions/*.appex tmp/Payload/YouTube.app/PlugIns
make package make package FINALPACKAGE=1
open ./packages open packages
elif [[ $PATHTOYT == *.app ]] elif [[ $PATHTOYT == *.app ]]
then then
mkdir -p ./tmp/Payload/ mkdir -p tmp/Payload/
cp -R "$PATHTOYT" ./tmp/Payload 2>/dev/null cp -R "$PATHTOYT" tmp/Payload 2>/dev/null
rm -rf ./tmp/Payload/YouTube.app/PlugIns/*.appex rm -rf tmp/Payload/YouTube.app/_CodeSignature/CodeResources
rm -rf tmp/Payload/YouTube.app/PlugIns/*.appex
cp -R Extensions/*.appex tmp/Payload/YouTube.app/PlugIns cp -R Extensions/*.appex tmp/Payload/YouTube.app/PlugIns
make package make package FINALPACKAGE=1
open ./packages open packages
else else
echo "This is not an ipa/app!" echo "This is not an ipa/app!"
fi fi
# Clean up # Clean up
tput setaf 1 && echo -e "==> \033[1mCleaning up...\033[0m" tput setaf 1 && echo -e "==> \033[1mCleaning up...\033[0m"
find Tweaks/uYou -mindepth 1 ! -name "com.miro.uyou_2.1_iphoneos-arm.deb" ! -name ".gitkeep" -exec rm -rf {} \; 2>/dev/null find Tweaks/uYou -mindepth 1 ! -name "com.miro.uyou_2.1_iphoneos-arm.deb" ! -name ".gitkeep" -exec rm -rf {} \; 2>/dev/null
rm -rf tmp/ Resources .theos/_/Payload rm -rf tmp/ Resources .theos/_/Payload
echo -e "==> \033[1mSHASUM256: $(shasum -a 256 packages/*.ipa)\033[0m"
@@ -1,6 +1,6 @@
// Settings // Settings
"VERSION" = "uYouPlus's version: %@"; "VERSION" = "Version de uYouPlus : %@";
"VERSION_CHECK" = "Tap to check for update!"; "VERSION_CHECK" = "Appuyez pour vérifier les mises à jour !";
"DONT_EAT_MY_CONTENT" = "Empêcher l'encoche/Dynamic Island de grignoter le contenu vidéo 2:1 (DontEatMyContent)"; "DONT_EAT_MY_CONTENT" = "Empêcher l'encoche/Dynamic Island de grignoter le contenu vidéo 2:1 (DontEatMyContent)";
"DONT_EAT_MY_CONTENT_DESC" = "Empêche l'encoche/Dynamic Island de grignoter du contenu vidéo 2:1 dans YouTube. Le redémarrage de l'application est nécessaire."; "DONT_EAT_MY_CONTENT_DESC" = "Empêche l'encoche/Dynamic Island de grignoter du contenu vidéo 2:1 dans YouTube. Le redémarrage de l'application est nécessaire.";
@@ -8,7 +8,7 @@
"REPLACE_PREVIOUS_NEXT_BUTTON" = "Remplacer le bouton précédent et suivant"; "REPLACE_PREVIOUS_NEXT_BUTTON" = "Remplacer le bouton précédent et suivant";
"REPLACE_PREVIOUS_NEXT_BUTTON_DESC" = "Remplace les boutons Précédent et Suivant par les boutons Avance rapide et Retour rapide. Le redémarrage de l'application est nécessaire"; "REPLACE_PREVIOUS_NEXT_BUTTON_DESC" = "Remplace les boutons Précédent et Suivant par les boutons Avance rapide et Retour rapide. Le redémarrage de l'application est nécessaire";
"FIX_GOOGLE_SIGNIN" = "Réparer l'identification Google (pour les utilisateurs de TrollStore uniquement)" ; "FIX_GOOGLE_SIGNIN" = "Réparer l'identification Google (pour les utilisateurs de TrollStore uniquement)";
"FIX_GOOGLE_SIGNIN_DESC" = "Activez cette option uniquement si vous ne pouvez pas vous connecter avec votre compte Google et que l'application a été installée via TrollStore. Si vous pouvez vous connecter normalement, laissez-la désactivée. Le redémarrage de l'application est nécessaire."; "FIX_GOOGLE_SIGNIN_DESC" = "Activez cette option uniquement si vous ne pouvez pas vous connecter avec votre compte Google et que l'application a été installée via TrollStore. Si vous pouvez vous connecter normalement, laissez-la désactivée. Le redémarrage de l'application est nécessaire.";
"HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Masquer les boutons Précédent et Suivant"; "HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Masquer les boutons Précédent et Suivant";
@@ -1,17 +1,17 @@
/* uYouPlusSettings */ /* uYouPlusSettings */
"VERSION" = "uYouPlus's version: %@"; "VERSION" = "Версия uYouPlus: %@";
"VERSION_CHECK" = "Tap to check for update!"; "VERSION_CHECK" = "Нажмите, чтобы проверить доступные обновления.";
"DONT_EAT_MY_CONTENT" = "Предотвратить выемку/остров на видеоконтенте 2:1 (DontEatMyContent)"; "DONT_EAT_MY_CONTENT" = "Запретить обрезку контента (DontEatMyContent)";
"DONT_EAT_MY_CONTENT_DESC" = "Не позволяйте вырезу/Dynamic Island поглощать видеоконтент 2:1 на YouTube. Требуется перезапуск приложения."; "DONT_EAT_MY_CONTENT_DESC" = "Запрещает обрезать контент с соотношением сторон 2:1 на устройствах с вырезом. Потребуется перезагрузка.";
"REPLACE_PREVIOUS_NEXT_BUTTON" = "Заменить кнопку "Назад" и "Далее"; "REPLACE_PREVIOUS_NEXT_BUTTON" = "Кнопки перемотки вместо «Пред.» и «След.»";
"REPLACE_PREVIOUS_NEXT_BUTTON_DESC" = "Замените кнопки «Назад» и «Далее» на кнопки «Перемотка вперед» и «Назад». Требуется перезапуск приложения."; "REPLACE_PREVIOUS_NEXT_BUTTON_DESC" = "Заменяет переключатели «Следующий» и «Предыдущий» на кнопки перемотки на 10 сек. Потребуется перезагрузка.";
"FIX_GOOGLE_SIGNIN" = "Исправить вход через Google (только для пользователя TrollStore)"; "FIX_GOOGLE_SIGNIN" = "Исправить авторизацию (TrollStore)";
"FIX_GOOGLE_SIGNIN_DESC" = "Включайте эту опцию, только если вы не можете войти в свою учетную запись Google и приложение было установлено через TrollStore. Если вы можете нормально войти в систему, оставьте ее отключенной. Требуется перезапуск приложения."; "FIX_GOOGLE_SIGNIN_DESC" = "Включите данную опцию только не можете войти в учетную запись Google, а приложение установлено через TrollStore. Если удается авторизоваться как обычно, оставьте данную опцию отключенной. Потребуется перезагрузка.";
"HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Скрыть «Пред.» и «След.»"; "HIDE_PREVIOUS_AND_NEXT_BUTTON" = "Скрыть «След.» и «Пред.»";
"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "Убирает кнопки переключения видео «Следующий» и «Предыдущий» с плеера."; "HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "Убирает кнопки переключения видео «Следующий» и «Предыдущий» с плеера.";
"YT_MINIPLAYER" = "Мини-плеер для всех видео"; "YT_MINIPLAYER" = "Мини-плеер для всех видео";
@@ -1,15 +1,15 @@
// Settings // Settings
"VERSION" = "uYouPlus's version: %@"; "VERSION" = "uYouPlus 版本為: %@";
"VERSION_CHECK" = "Tap to check for update!"; "VERSION_CHECK" = "查看最新版本";
"DONT_EAT_MY_CONTENT" = "2:1影片瀏海/動態島優化 DontEatMyContent"; "DONT_EAT_MY_CONTENT" = "2:1 影片瀏海/動態島優化(DontEatMyContent";
"DONT_EAT_MY_CONTENT_DESC" = "改進部分機型的瀏海區域動態島在2:1比例影片中引發的遮擋問題需要重新啟動應用程式。"; "DONT_EAT_MY_CONTENT_DESC" = "改進部分機型的瀏海區域/動態島在 2:1 影片中的遮擋問題需要重新啟動應用程式。";
"REPLACE_PREVIOUS_NEXT_BUTTON" = "換上一個/下一個按鈕"; "REPLACE_PREVIOUS_NEXT_BUTTON" = "換上一個/下一個按鈕";
"REPLACE_PREVIOUS_NEXT_BUTTON_DESC" = "將影片播放器控制介面上的上一個/下一個按鈕替換成快進/快退按鈕需要重新啟動應用程式。"; "REPLACE_PREVIOUS_NEXT_BUTTON_DESC" = "將影片播放器控制介面上的上一個/下一個按鈕替換成快轉/倒轉按鈕需要重新啟動應用程式。";
"FIX_GOOGLE_SIGNIN" = "修復Google帳號登入問題(僅TrollStore用戶有效)"; "FIX_GOOGLE_SIGNIN" = "修復 Google 帳號登入問題(僅TrollStore 使用者有效)";
"FIX_GOOGLE_SIGNIN_DESC" = "僅在使用TrollStore安裝本App的情況下生效:啟用本設後即可正常登錄您的Google帳號需要重新啟動應用程式。"; "FIX_GOOGLE_SIGNIN_DESC" = "僅在使用 TrollStore 安裝此應用程式時有效:啟用本設後即可正常登Google 帳號需要重新啟動應用程式。";
"HIDE_PREVIOUS_AND_NEXT_BUTTON" = "隱藏上一個和下一個按鈕"; "HIDE_PREVIOUS_AND_NEXT_BUTTON" = "隱藏上一個和下一個按鈕";
"HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "在影片控制層中隱藏上一個和下一個按鈕"; "HIDE_PREVIOUS_AND_NEXT_BUTTON_DESC" = "在影片控制層中隱藏上一個和下一個按鈕";
@@ -18,40 +18,40 @@
"YT_MINIPLAYER_DESC" = "例如兒童影片"; "YT_MINIPLAYER_DESC" = "例如兒童影片";
"CAST_CONFIRM" = "投放前確認 (YTCastConfirm)"; "CAST_CONFIRM" = "投放前確認 (YTCastConfirm)";
"CAST_CONFIRM_DESC" = "在投放前顯示確認訊息,以防止意外攔劫電視。"; "CAST_CONFIRM_DESC" = "在投放前顯示確認訊息,以防止家人幹樵。";
"HIDE_HOVER_CARD" = "隱藏片尾畫面懸浮卡片 (YTNoHoverCards)"; "HIDE_HOVER_CARD" = "隱藏片尾畫面懸浮卡片 (YTNoHoverCards)";
"HIDE_HOVER_CARD_DESC" = "在影片結尾隱藏創作者結束畫面(縮略圖)。"; "HIDE_HOVER_CARD_DESC" = "在影片結尾隱藏創作者結束畫面。";
"NEW_MINIPLAYER_STYLE" = "新的迷你播放器控制列風格 (BigYTMiniPlayer)"; "NEW_MINIPLAYER_STYLE" = "迷你播放器 (BigYTMiniPlayer)";
"NEW_MINIPLAYER_STYLE_DESC" = "需要重新啟動應用程式。"; "NEW_MINIPLAYER_STYLE_DESC" = "需要重新啟動應用程式。";
"YT_RE_EXPLORE" = "用探索選項卡替換Shorts選項卡 (YTReExplore)"; "YT_RE_EXPLORE" = "用探索選項卡代替 Shorts 選項卡 (YTReExplore)";
"YT_RE_EXPLORE_DESC" = "需要重新啟動應用程式。"; "YT_RE_EXPLORE_DESC" = "需要重新啟動應用程式。";
"HIDE_SUBTITLES_BUTTON" = "隱藏字幕按鈕"; "HIDE_SUBTITLES_BUTTON" = "隱藏字幕按鈕";
"HIDE_SUBTITLES_BUTTON_DESC" = "隱藏影片控制層中的字幕按鈕。"; "HIDE_SUBTITLES_BUTTON_DESC" = "隱藏影片控制層中的字幕按鈕。";
"HIDE_AUTOPLAY_SWITCH" = "隱藏自動播放開關"; "HIDE_AUTOPLAY_SWITCH" = "隱藏自動播放開關";
"HIDE_AUTOPLAY_SWITCH_DESC" = "在影片控制中隱藏自動播放開關。"; "HIDE_AUTOPLAY_SWITCH_DESC" = "在影片控制中隱藏自動播放開關。";
"AUTO_FULLSCREEN" = "自動全螢幕 (YTAutoFullScreen)"; "AUTO_FULLSCREEN" = "自動全螢幕 (YTAutoFullScreen)";
"AUTO_FULLSCREEN_DESC" = "自動全螢幕播放影片。"; "AUTO_FULLSCREEN_DESC" = "自動全螢幕播放影片。";
"HIDE_HUD_MESSAGES" = "隱藏 HUD 訊息"; "HIDE_HUD_MESSAGES" = "隱藏 HUD 訊息";
"HIDE_HUD_MESSAGES_DESC" = "舉例來說CC字幕 開啟/關閉影片循環開啟..."; "HIDE_HUD_MESSAGES_DESC" = "例如CC字幕開啟/關閉影片循環開啟...";
"OLED_DARKMODE" = "OLED 深色模式(實驗性)"; "OLED_DARKMODE" = "OLED 深色模式(實驗性)";
"OLED_DARKMODE_DESC" = "在某些情況下可能無法正常作。啟用/禁用此選項後,需要重新啟動應用程式。"; "OLED_DARKMODE_DESC" = "在某些情況下無法正常作。更動此選項後,需要重新啟動應用程式。";
"OLED_KEYBOARD" = "OLED 鍵盤(實驗性)"; "OLED_KEYBOARD" = "OLED 鍵盤(實驗性)";
"OLED_KEYBOARD_DESC" = "在某些情況下可能無法正常作。需要重新啟動應用程式。"; "OLED_KEYBOARD_DESC" = "在某些情況下可能無法正常作。需要重新啟動應用程式。";
"HIDE_PAID_PROMOTION_CARDS" = "隱藏付費促銷橫幅"; "HIDE_PAID_PROMOTION_CARDS" = "隱藏付費橫幅YTNoPaidPromo";
"HIDE_PAID_PROMOTION_CARDS_DESC" = "在某些影片中隱藏包括付費促銷橫幅。"; "HIDE_PAID_PROMOTION_CARDS_DESC" = "在某些影片中隱藏包括付費促銷橫幅。";
// YTCastConfirm // YTCastConfirm
"CASTING" = "投放中"; "CASTING" = "投放中";
"MSG_ARE_YOU_SURE" = "確定要開始投放嗎?"; "MSG_ARE_YOU_SURE" = "是否開始投放嗎?";
"MSG_YES" = "確定"; "MSG_YES" = "確定";
"MSG_CANCEL" = "取消"; "MSG_CANCEL" = "取消";
+189 -114
View File
@@ -20,6 +20,8 @@
#import "Tweaks/YouTubeHeader/YTReelWatchPlaybackOverlayView.h" #import "Tweaks/YouTubeHeader/YTReelWatchPlaybackOverlayView.h"
#import "Tweaks/YouTubeHeader/YTReelPlayerBottomButton.h" #import "Tweaks/YouTubeHeader/YTReelPlayerBottomButton.h"
#import "Tweaks/YouTubeHeader/YTReelPlayerViewController.h" #import "Tweaks/YouTubeHeader/YTReelPlayerViewController.h"
#import "Tweaks/YouTubeHeader/YTAlertView.h"
#import "Tweaks/YouTubeHeader/YTIElementRenderer.h"
// Tweak's bundle for Localizations support - @PoomSmart - https://github.com/PoomSmart/YouPiP/commit/aea2473f64c75d73cab713e1e2d5d0a77675024f // Tweak's bundle for Localizations support - @PoomSmart - https://github.com/PoomSmart/YouPiP/commit/aea2473f64c75d73cab713e1e2d5d0a77675024f
NSBundle *uYouPlusBundle() { NSBundle *uYouPlusBundle() {
@@ -187,35 +189,16 @@ BOOL dontEatMyContent() {
%hook MDXPlaybackRouteButtonController %hook MDXPlaybackRouteButtonController
- (void)didPressButton:(id)arg1 { - (void)didPressButton:(id)arg1 {
if (castConfirm()) { if (castConfirm()) {
UIAlertController* alertController = [%c(UIAlertController) alertControllerWithTitle:LOC(@"CASTING") NSBundle *tweakBundle = uYouPlusBundle();
message:LOC(@"MSG_ARE_YOU_SURE") YTAlertView *alertView = [%c(YTAlertView) confirmationDialogWithAction:^{
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* defaultAction = [%c(UIAlertAction) actionWithTitle:LOC(@"MSG_YES") style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
%orig; %orig;
}]; } actionTitle:LOC(@"MSG_YES")];
alertView.title = LOC(@"CASTING");
UIAlertAction* noButton = [%c(UIAlertAction) alertView.subtitle = LOC(@"MSG_ARE_YOU_SURE");
actionWithTitle:LOC(@"MSG_CANCEL") [alertView show];
style:UIAlertActionStyleDefault } else {
handler: ^(UIAlertAction * action) { return %orig;
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];
} else { return %orig; }
} }
%end %end
@@ -226,6 +209,29 @@ BOOL dontEatMyContent() {
} }
%end %end
// Hide search ads by @PoomSmart - https://github.com/PoomSmart/YouTube-X
BOOL didLateHook = NO;
%group LateHook
%hook YTIElementRenderer
- (NSData *)elementData {
if (self.hasCompatibilityOptions && self.compatibilityOptions.hasAdLoggingData)
return nil;
return %orig;
}
%end
%end
%hook YTSectionListViewController
- (void)loadWithModel:(id)model {
if (!didLateHook) {
%init(LateHook);
didLateHook = YES;
}
%orig;
}
%end
// Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/94 // Workaround for https://github.com/MiRO92/uYou-for-YouTube/issues/94
%hook UIResponder %hook UIResponder
%new %new
@@ -261,9 +267,9 @@ BOOL dontEatMyContent() {
%end %end
// YTNoCheckLocalNetwork: https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html // YTNoCheckLocalNetwork: https://poomsmart.github.io/repo/depictions/ytnochecklocalnetwork.html
%hook YTHotConfig // %hook YTHotConfig
- (BOOL)isPromptForLocalNetworkPermissionsEnabled { return NO; } // - (BOOL)isPromptForLocalNetworkPermissionsEnabled { return NO; }
%end // %end
// A/B flags // A/B flags
%hook YTColdConfig %hook YTColdConfig
@@ -643,6 +649,16 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
} }
%end %end
// Sub menu?
%hook ELMView
- (void)didMoveToWindow {
%orig;
if (isDarkMode()) {
self.subviews[0].backgroundColor = [UIColor clearColor];
}
}
%end
// iSponsorBlock // iSponsorBlock
%hook SponsorBlockSettingsController %hook SponsorBlockSettingsController
- (void)viewDidLoad { - (void)viewDidLoad {
@@ -753,6 +769,16 @@ UIColor* raisedColor = [UIColor colorWithRed:0.035 green:0.035 blue:0.035 alpha:
} }
%end %end
//
%hook YTBackstageCreateRepostDetailView
- (void)setBackgroundColor:(UIColor *)color {
if (isDarkMode()) {
return %orig([UIColor blackColor]);
}
return %orig;
}
%end
// Others // Others
%hook _ASDisplayView %hook _ASDisplayView
- (void)didMoveToWindow { - (void)didMoveToWindow {
@@ -903,153 +929,202 @@ static void replaceTab(YTIGuideResponse *response) {
%end %end
// DontEatMyContent - @therealFoxster: https://github.com/therealFoxster/DontEatMyContent // DontEatMyContent - @therealFoxster: https://github.com/therealFoxster/DontEatMyContent
double aspectRatio = 16/9; static double videoAspectRatio = 16/9;
bool zoomedToFill = false; static bool zoomedToFill = false;
static bool engagementPanelIsVisible = false, removeEngagementPanelViewControllerWithIdentifierCalled = false;
MLHAMSBDLSampleBufferRenderingView *renderingView; static MLHAMSBDLSampleBufferRenderingView *renderingView;
NSLayoutConstraint *widthConstraint, *heightConstraint, *centerXConstraint, *centerYConstraint; static NSLayoutConstraint *widthConstraint, *heightConstraint, *centerXConstraint, *centerYConstraint;
%group gDontEatMyContent %group gDontEatMyContent
// Retrieve video aspect ratio
%hook YTPlayerView
- (void)setAspectRatio:(CGFloat)aspectRatio {
%orig(aspectRatio);
videoAspectRatio = aspectRatio;
}
%end
%hook YTPlayerViewController %hook YTPlayerViewController
- (void)viewDidAppear:(BOOL)animated { - (void)viewDidAppear:(BOOL)animated {
YTPlayerView *playerView = [self playerView]; YTPlayerView *playerView = [self playerView];
UIView *renderingViewContainer = MSHookIvar<UIView *>(playerView, "_renderingViewContainer"); UIView *renderingViewContainer = MSHookIvar<UIView *>(playerView, "_renderingViewContainer");
renderingView = [playerView renderingView]; renderingView = [playerView renderingView];
CGFloat constant = 23; // Make renderingView a bit larger since safe area has sizeable margins from the notch and side borders; tested on iPhone 13 mini // Making renderingView a bit larger since constraining to safe area leaves a gap between the notch and video
CGFloat constant = 24.5; // Tested on iPhone 13 mini
widthConstraint = [renderingView.widthAnchor constraintEqualToAnchor:renderingViewContainer.safeAreaLayoutGuide.widthAnchor constant:constant]; widthConstraint = [renderingView.widthAnchor constraintEqualToAnchor:renderingViewContainer.safeAreaLayoutGuide.widthAnchor constant:constant];
heightConstraint = [renderingView.heightAnchor constraintEqualToAnchor:renderingViewContainer.safeAreaLayoutGuide.heightAnchor constant:constant]; heightConstraint = [renderingView.heightAnchor constraintEqualToAnchor:renderingViewContainer.safeAreaLayoutGuide.heightAnchor constant:constant];
centerXConstraint = [renderingView.centerXAnchor constraintEqualToAnchor:renderingViewContainer.centerXAnchor]; centerXConstraint = [renderingView.centerXAnchor constraintEqualToAnchor:renderingViewContainer.centerXAnchor];
centerYConstraint = [renderingView.centerYAnchor constraintEqualToAnchor:renderingViewContainer.centerYAnchor]; centerYConstraint = [renderingView.centerYAnchor constraintEqualToAnchor:renderingViewContainer.centerYAnchor];
// playerView.backgroundColor = [UIColor greenColor]; // playerView.backgroundColor = [UIColor blueColor];
// renderingViewContainer.backgroundColor = [UIColor redColor]; // renderingViewContainer.backgroundColor = [UIColor greenColor];
// renderingView.backgroundColor = [UIColor blueColor]; // renderingView.backgroundColor = [UIColor redColor];
YTMainAppVideoPlayerOverlayViewController *activeVideoPlayerOverlay = [self activeVideoPlayerOverlay]; YTMainAppVideoPlayerOverlayViewController *activeVideoPlayerOverlay = [self activeVideoPlayerOverlay];
// Must check class since YTInlineMutedPlaybackPlayerOverlayViewController doesn't have -(BOOL)isFullscreen // Must check class since YTInlineMutedPlaybackPlayerOverlayViewController doesn't have -(BOOL)isFullscreen
if ([NSStringFromClass([activeVideoPlayerOverlay class]) isEqualToString:@"YTMainAppVideoPlayerOverlayViewController"] && [activeVideoPlayerOverlay isFullscreen]) { if ([NSStringFromClass([activeVideoPlayerOverlay class]) isEqualToString:@"YTMainAppVideoPlayerOverlayViewController"] // isKindOfClass doesn't work for some reason
activate(); && [activeVideoPlayerOverlay isFullscreen]) {
if (!zoomedToFill && !engagementPanelIsVisible) DEMC_activate();
} else { } else {
center(); DEMC_centerRenderingView();
} }
%orig(animated); %orig(animated);
} }
- (void)didPressToggleFullscreen { - (void)didPressToggleFullscreen {
YTMainAppVideoPlayerOverlayViewController *activeVideoPlayerOverlay = [self activeVideoPlayerOverlay]; %orig;
if (![[self activeVideoPlayerOverlay] isFullscreen]) { // Entering full screen
if (![activeVideoPlayerOverlay isFullscreen]) // Entering fullscreen if (!zoomedToFill && !engagementPanelIsVisible) DEMC_activate();
activate(); } else { // Exiting full screen
else // Exiting fullscreen DEMC_deactivate();
deactivate(); }
%orig; %orig;
} }
- (void)didSwipeToEnterFullscreen { - (void)didSwipeToEnterFullscreen {
%orig; activate(); %orig;
if (!zoomedToFill && !engagementPanelIsVisible) DEMC_activate();
} }
- (void)didSwipeToExitFullscreen { - (void)didSwipeToExitFullscreen {
%orig; deactivate(); %orig;
DEMC_deactivate();
} }
// Get video aspect ratio; doesn't work for some users; see -(void)resetForVideoWithAspectRatio:(double) // New video played
- (void)singleVideo:(id)arg1 aspectRatioDidChange:(CGFloat)arg2 { -(void)playbackController:(id)playbackController didActivateVideo:(id)video withPlaybackData:(id)playbackData {
aspectRatio = arg2; %orig(playbackController, video, playbackData);
if (aspectRatio == 0.0) { if ([[self activeVideoPlayerOverlay] isFullscreen]) // New video played while in full screen (landscape)
// App backgrounded // Activate since new videos played in full screen aren't zoomed-to-fill by default
} else if (aspectRatio < THRESHOLD) { // (i.e. the notch/Dynamic Island will cut into content when playing a new video in full screen)
deactivate(); DEMC_activate();
} else { engagementPanelIsVisible = false;
activate(); removeEngagementPanelViewControllerWithIdentifierCalled = false;
}
%orig(arg1, arg2);
} }
%end %end
%hook YTVideoZoomOverlayView // Pinch to zoom
%hook YTVideoFreeZoomOverlayView
- (void)didRecognizePinch:(UIPinchGestureRecognizer *)pinchGestureRecognizer { - (void)didRecognizePinch:(UIPinchGestureRecognizer *)pinchGestureRecognizer {
// %log((CGFloat) [pinchGestureRecognizer scale], (CGFloat) [pinchGestureRecognizer velocity]); DEMC_deactivate();
if ([pinchGestureRecognizer velocity] <= 0.0) { // >>Zoom out<<
zoomedToFill = false;
activate();
} else if ([pinchGestureRecognizer velocity] > 0.0) { // <<Zoom in>>
zoomedToFill = true;
deactivate();
}
%orig(pinchGestureRecognizer); %orig(pinchGestureRecognizer);
} }
- (void)flashAndHideSnapIndicator {} // Detect zoom to fill
// https://github.com/lgariv/UniZoom/blob/master/Tweak.xm - (void)showLabelForSnapState:(NSInteger)snapState {
- (void)setSnapIndicatorVisible:(bool)arg1 { if (snapState == 0) { // Original
%orig(NO); zoomedToFill = false;
} DEMC_activate();
%end } else if (snapState == 1) { // Zoomed to fill
zoomedToFill = true;
%hook YTVideoZoomOverlayController // No need to deactivate constraints as it's already done in -(void)didRecognizePinch:(UIPinchGestureRecognizer *)
// Get video aspect ratio; fallback for -(void)singleVideo:(id)aspectRatioDidChange:(CGFloat)
- (void)resetForVideoWithAspectRatio:(double)arg1 {
aspectRatio = arg1;
%log;
if (aspectRatio == 0.0) {}
else if (aspectRatio < THRESHOLD) {
deactivate();
} else {
activate();
} }
%orig(arg1); %orig(snapState);
} }
%end %end
%end // gDontEatMyContent
// DontEatMycontent - detecting device model // Mini bar dismiss
// https://stackoverflow.com/a/11197770/19227228 %hook YTWatchMiniBarViewController
NSString* deviceName() { - (void)dismissMiniBarWithVelocity:(CGFloat)velocity gestureType:(int)gestureType {
%orig(velocity, gestureType);
zoomedToFill = false; // Setting to false since YouTube undoes zoom-to-fill when mini bar is dismissed
}
- (void)dismissMiniBarWithVelocity:(CGFloat)velocity gestureType:(int)gestureType skipShouldDismissCheck:(BOOL)skipShouldDismissCheck {
%orig(velocity, gestureType, skipShouldDismissCheck);
zoomedToFill = false;
}
%end
%hook YTMainAppEngagementPanelViewController
// Engagement panel (comment, description, etc.) about to show up
- (void)viewWillAppear:(BOOL)animated {
if ([self isPeekingSupported]) {
// Shorts (only Shorts support peeking, I think)
} else {
// Everything else
engagementPanelIsVisible = true;
if ([self isLandscapeEngagementPanel]) {
DEMC_deactivate();
}
}
%orig(animated);
}
// Engagement panel about to dismiss
// - (void)viewDidDisappear:(BOOL)animated { %orig; %log; } // Called too late & isn't reliable so sometimes constraints aren't activated even when engagement panel is closed
%end
%hook YTEngagementPanelContainerViewController
// Engagement panel about to dismiss
- (void)notifyEngagementPanelContainerControllerWillHideFinalPanel { // Called in time but crashes if plays new video while in full screen causing engagement panel dismissal
// Must check if engagement panel was dismissed because new video played
// (i.e. if -(void)removeEngagementPanelViewControllerWithIdentifier:(id) was called prior)
if (![self isPeekingSupported] && !removeEngagementPanelViewControllerWithIdentifierCalled) {
engagementPanelIsVisible = false;
if ([self isLandscapeEngagementPanel] && !zoomedToFill) {
DEMC_activate();
}
}
%orig;
}
- (void)removeEngagementPanelViewControllerWithIdentifier:(id)identifier {
// Usually called when engagement panel is open & new video is played or mini bar is dismissed
removeEngagementPanelViewControllerWithIdentifierCalled = true;
%orig(identifier);
}
%end
%end// group gDontEatMyContent
BOOL DEMC_deviceIsSupported() {
// Get device model identifier (e.g. iPhone14,4)
// https://stackoverflow.com/a/11197770/19227228
struct utsname systemInfo; struct utsname systemInfo;
uname(&systemInfo); uname(&systemInfo);
return [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; NSString *deviceModelID = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
}
BOOL isDeviceSupported() {
NSString *identifier = deviceName();
NSArray *unsupportedDevices = UNSUPPORTED_DEVICES;
for (NSString *device in unsupportedDevices) { NSArray *unsupportedModelIDs = DEMC_UNSUPPORTED_DEVICES;
if ([device isEqualToString:identifier]) { for (NSString *identifier in unsupportedModelIDs) {
if ([deviceModelID isEqualToString:identifier]) {
return NO; return NO;
} }
} }
if ([identifier containsString:@"iPhone"]) { if ([deviceModelID containsString:@"iPhone"]) {
NSString *model = [identifier stringByReplacingOccurrencesOfString:@"iPhone" withString:@""]; if ([deviceModelID isEqualToString:@"iPhone13,1"]) {
model = [model stringByReplacingOccurrencesOfString:@"," withString:@"."]; // iPhone 12 mini
if ([identifier isEqualToString:@"iPhone13,1"]) { // iPhone 12 mini
return YES; return YES;
} else if ([model floatValue] >= 14.0) { // iPhone 13 series and newer }
NSString *modelNumber = [[deviceModelID stringByReplacingOccurrencesOfString:@"iPhone" withString:@""] stringByReplacingOccurrencesOfString:@"," withString:@"."];
if ([modelNumber floatValue] >= 14.0) {
// iPhone 13 series and newer
return YES; return YES;
} else return NO; } else return NO;
} else return NO; } else return NO;
} }
void activate() { void DEMC_activate() {
if (aspectRatio < THRESHOLD || zoomedToFill) return; if (videoAspectRatio < DEMC_THRESHOLD) {
DEMC_deactivate();
return;
}
// NSLog(@"activate"); // NSLog(@"activate");
center(); DEMC_centerRenderingView();
renderingView.translatesAutoresizingMaskIntoConstraints = NO; renderingView.translatesAutoresizingMaskIntoConstraints = NO;
widthConstraint.active = YES; widthConstraint.active = YES;
heightConstraint.active = YES; heightConstraint.active = YES;
} }
void deactivate() { void DEMC_deactivate() {
// NSLog(@"deactivate"); // NSLog(@"deactivate");
center(); DEMC_centerRenderingView();
renderingView.translatesAutoresizingMaskIntoConstraints = YES; renderingView.translatesAutoresizingMaskIntoConstraints = YES;
widthConstraint.active = NO; widthConstraint.active = NO;
heightConstraint.active = NO; heightConstraint.active = NO;
} }
void center() { void DEMC_centerRenderingView() {
centerXConstraint.active = YES; centerXConstraint.active = YES;
centerYConstraint.active = YES; centerYConstraint.active = YES;
} }
@@ -1159,7 +1234,7 @@ static BOOL didFinishLaunching;
if (replacePreviousAndNextButton()) { if (replacePreviousAndNextButton()) {
%init(gReplacePreviousAndNextButton); %init(gReplacePreviousAndNextButton);
} }
if (dontEatMyContent() && isDeviceSupported()) { if (dontEatMyContent() && DEMC_deviceIsSupported()) {
%init(gDontEatMyContent); %init(gDontEatMyContent);
} }
if (@available(iOS 16, *)) { if (@available(iOS 16, *)) {