]> git.saurik.com Git - cydia.git/blobdiff - CyteKit/WebViewController.mm
Use the correct color for 'Loading...'.
[cydia.git] / CyteKit / WebViewController.mm
index 964e5237e6e28adb6953ee4b224dfef3feace71f..6263faf09a7f04f96785ffc7498f9758fec12b71 100644 (file)
@@ -147,6 +147,10 @@ float CYScrollViewDecelerationRateNormal;
     [super dealloc];
 }
 
+- (NSString *) description {
+    return [NSString stringWithFormat:@"<%s: %p, %@>", class_getName([self class]), self, [[request_ URL] absoluteString]];
+}
+
 - (CyteWebView *) webView {
     return (CyteWebView *) [self view];
 }
@@ -775,6 +779,10 @@ float CYScrollViewDecelerationRateNormal;
     } return self;
 }
 
+- (NSString *) applicationNameForUserAgent {
+    return nil;
+}
+
 - (void) loadView {
     CGRect bounds([[UIScreen mainScreen] applicationFrame]);
 
@@ -812,6 +820,9 @@ float CYScrollViewDecelerationRateNormal;
     [preferences setJavaScriptCanOpenWindowsAutomatically:YES];
     [preferences setOfflineWebApplicationCacheEnabled:YES];
 
+    if (NSString *agent = [self applicationNameForUserAgent])
+        [webview setApplicationNameForUserAgent:agent];
+
     if ([webview respondsToSelector:@selector(setShouldUpdateWhileOffscreen:)])
         [webview setShouldUpdateWhileOffscreen:NO];