diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2009-08-13 09:55:12 +0000 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2010-09-30 07:13:58 +0000 |
commit | 35bf217f57c435980e1b6cbf2ff60c0451c30e14 (patch) | |
tree | 40ee5b53d7a63032405c4e088fde0af85ed0ea2b /Cydia.mm | |
parent | bfc87a4de0bb13a8dbb3d222baff1154559d9841 (diff) |
Fixed viewport and user agent.
Diffstat (limited to 'Cydia.mm')
-rw-r--r-- | Cydia.mm | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -3810,17 +3810,18 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { WebView *webview([webview_ webView]); Package *package([[Database sharedInstance] packageWithName:@"cydia"]); + NSString *application = package == nil ? @"Cydia" : [NSString stringWithFormat:@"Cydia/%@", [package installed] ]; - if (Product_ != nil) - application = [NSString stringWithFormat:@"%@ Version/%@", application, Product_]; - if (Build_ != nil) - application = [NSString stringWithFormat:@"%@ Mobile/%@", application, Build_]; if (Safari_ != nil) - application = [NSString stringWithFormat:@"%@ Safari/%@", application, Safari_]; + application = [NSString stringWithFormat:@"Safari/%@ %@", application, Safari_]; + if (Build_ != nil) + application = [NSString stringWithFormat:@"Mobile/%@ %@", application, Build_]; + if (Product_ != nil) + application = [NSString stringWithFormat:@"Version/%@ %@", application, Product_]; [webview setApplicationNameForUserAgent:application]; } return self; |