diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-23 07:26:11 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-07 02:41:10 -0800 |
commit | b0a2900d75fc533470a521610e6fddc69dac33c1 (patch) | |
tree | 74fb45edf7a74493a81b30223389e99f065c7cbb /MobileCydia.mm | |
parent | 3ea82d91d07fcd4ae6ae0db105228e091d2b9e91 (diff) |
Support about:cydia- in addition to cydia://.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 23621ce..6806143 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -6896,10 +6896,14 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { NSURL *url([request URL]); if (url == nil) return NO; + NSString *scheme([[url scheme] lowercaseString]); - if (scheme == nil || ![scheme isEqualToString:@"cydia"]) - return NO; - return YES; + if (scheme != nil && [scheme isEqualToString:@"cydia"]) + return YES; + if ([[url absoluteString] hasPrefix:@"about:cydia-"]) + return YES; + + return NO; } + (NSURLRequest *) canonicalRequestForRequest:(NSURLRequest *)request { @@ -6926,8 +6930,16 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { NSURL *url([request URL]); NSString *href([url absoluteString]); + NSString *scheme([[url scheme] lowercaseString]); + + NSString *path; + + if ([scheme isEqualToString:@"cydia"]) + path = [href substringFromIndex:8]; + else if ([scheme isEqualToString:@"about"]) + path = [href substringFromIndex:12]; + else _assert(false); - NSString *path([href substringFromIndex:8]); NSRange slash([path rangeOfString:@"/"]); NSString *command; |