Merge pull request #694 from AlphaCluster/master

Adding Opera Mini as an option for default browser.
This commit is contained in:
Samuel Clay 2015-06-05 11:30:06 -07:00
commit e171992dd0
3 changed files with 19 additions and 1 deletions

View file

@ -1513,7 +1513,21 @@
sourceName]];
[[UIApplication sharedApplication] openURL:activityURL];
return;
return;
} else if ([[preferences stringForKey:@"story_browser"] isEqualToString:@"opera_mini"] &&
[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"opera-http://"]]) {
NSString *operaURL;
NSRange prefix = [[url absoluteString] rangeOfString: @"http"];
if (NSNotFound != prefix.location) {
operaURL = [[url absoluteString]
stringByReplacingCharactersInRange: prefix
withString: @"opera-http"];
}
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:operaURL]];
return;
} else {
self.activeOriginalStoryURL = url;

View file

@ -414,6 +414,7 @@
<string>In-app browser</string>
<string>Safari</string>
<string>Chrome</string>
<string>Opera Mini</string>
</array>
<key>DefaultValue</key>
<string>inapp</string>
@ -422,6 +423,7 @@
<string>inapp</string>
<string>safari</string>
<string>chrome</string>
<string>opera_mini</string>
</array>
<key>Key</key>
<string>story_browser</string>

View file

@ -434,6 +434,7 @@
<string>In-app browser</string>
<string>Safari</string>
<string>Chrome</string>
<string>Opera Mini</string>
</array>
<key>DefaultValue</key>
<string>inapp</string>
@ -442,6 +443,7 @@
<string>inapp</string>
<string>safari</string>
<string>chrome</string>
<string>opera_mini</string>
</array>
<key>Key</key>
<string>story_browser</string>