diff options
-rw-r--r-- | MobileCydia.mm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 3e0d16a..a5f5776 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4701,12 +4701,20 @@ static NSMutableSet *Diversions_; WebDataSource *source([frame dataSource]); NSURLResponse *response([source response]); NSURL *url([response URL]); + NSString *scheme([[url scheme] lowercaseString]); + + bool bridged(false); @synchronized (HostConfig_) { - if ([[[url scheme] lowercaseString] isEqualToString:@"https"]) + if ([scheme isEqualToString:@"file"]) + bridged = true; + else if ([scheme isEqualToString:@"https"]) if ([BridgedHosts_ containsObject:[url host]]) - [window setValue:cydia_ forKey:@"cydia"]; + bridged = true; } + + if (bridged) + [window setValue:cydia_ forKey:@"cydia"]; } - (NSURLRequest *) webView:(WebView *)view resource:(id)resource willSendRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)source { |