summaryrefslogtreecommitdiff
path: root/CyteKit
diff options
context:
space:
mode:
Diffstat (limited to 'CyteKit')
-rw-r--r--CyteKit/WebViewController.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index 964e523..76379fb 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -775,6 +775,10 @@ float CYScrollViewDecelerationRateNormal;
} return self;
}
+- (NSString *) applicationNameForUserAgent {
+ return nil;
+}
+
- (void) loadView {
CGRect bounds([[UIScreen mainScreen] applicationFrame]);
@@ -812,6 +816,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];