Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

added the ability to get full share link #137

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Tweak.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@
@interface AWEFeedTableViewController : UIViewController
- (void)scrollToNextVideo;
@end

@interface AWEShareLinkModel
-(NSString *)parsedURL:(NSString *)fullURL;
@end
25 changes: 25 additions & 0 deletions Tweak.xm
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,31 @@ static AWEFeedContainerViewController *__weak sharedInstance;
}
}
%end

%hook AWEShareLinkModel
NSString* fullURLShared;
-(void)setTextForCopy:(id)arg1 {
if ([(NSString*)arg1 containsString:@"@"]) {
fullURLShared = [self parsedURL:arg1];
}
%orig(fullURLShared);
}

%new
-(NSString *)parsedURL:(NSString *)fullURL {

NSRange searchedRange = NSMakeRange(0, [fullURL length]);
NSString *pattern = @"(.+?(?=\\\?))";
NSError *error = nil;
NSRegularExpression* regex = [NSRegularExpression regularExpressionWithPattern: pattern options:0 error:&error];
NSArray* matches = [regex matchesInString:fullURL options:0 range: searchedRange];
for (NSTextCheckingResult* match in matches) {
NSRange group1 = [match rangeAtIndex:1];
return [fullURL substringWithRange:group1];
}
return nil;
}
%end
%end

%ctor {
Expand Down
3 changes: 2 additions & 1 deletion control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: com.haoict.tiktokgod
Name: TikTok God
Depends: mobilesubstrate, preferenceloader, com.haoict.libhdev (>= 4.8.1), firmware (>= 12)
Version: 3.0.0
Version: 3.0.1
Architecture: iphoneos-arm
Description: The best tweak for TikTok app.
The best tweak for TikTok app.
Expand All @@ -16,6 +16,7 @@ Description: The best tweak for TikTok app.
- Can hide UI (view video in full screen)
- Bypass jailbreak detection (make like and follow work)
- Support iOS 12 - 14 & latest TikTok version
- Getting direct URL when pressing on Copy Link
.
I work very hard to make good, free and open source tweaks for everyone
If you want to support, you can buy me a coffee at https://www.paypal.me/haoict
Expand Down