Skip to content

Commit

Permalink
Add customUserAgent Property
Browse files Browse the repository at this point in the history
Add the customUserAgent property so you can set any UserAgent different
from OverrideUserAgent.
  • Loading branch information
NohohonNohon committed May 24, 2020
1 parent d53c806 commit 2abc6e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ios/CDVThemeableBrowser.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
@property (nonatomic) BOOL disableAnimation;
@property (nonatomic) BOOL fullscreen;
@property (nonatomic) BOOL allowsBackForwardNavigationGestures;
@property (nonatomic) NSString* customuseragent;
@property (nonatomic) NSString* customUserAgent;

@end

Expand Down
4 changes: 2 additions & 2 deletions src/ios/CDVThemeableBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,8 @@ - (void)openInThemeableBrowser:(NSURL*)url withOptions:(NSString*)options
if (self.themeableBrowserViewController == nil) {
NSString* userAgent = [CDVUserAgentUtil originalUserAgent];
NSString* overrideUserAgent = [self settingForKey:@"OverrideUserAgent"];
if (browserOptions.customuseragent) {
userAgent = browserOptions.customuseragent;
if (browserOptions.customUserAgent) {
userAgent = browserOptions.customUserAgent;
} else if (overrideUserAgent) {
userAgent = overrideUserAgent;
} else {
Expand Down

0 comments on commit 2abc6e7

Please sign in to comment.