summaryrefslogtreecommitdiff
path: root/Cydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2009-08-13 09:55:12 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:13:58 +0000
commit35bf217f57c435980e1b6cbf2ff60c0451c30e14 (patch)
tree40ee5b53d7a63032405c4e088fde0af85ed0ea2b /Cydia.mm
parentbfc87a4de0bb13a8dbb3d222baff1154559d9841 (diff)
Fixed viewport and user agent.
Diffstat (limited to 'Cydia.mm')
-rw-r--r--Cydia.mm11
1 files changed, 6 insertions, 5 deletions
diff --git a/Cydia.mm b/Cydia.mm
index 239c584..f00d4d7 100644
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -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;