Add Edge as a browser option

This commit is contained in:
Jimmy Garrido 2020-02-13 20:07:12 -08:00
parent 9e6e82b333
commit 3f10bf866e
3 changed files with 15 additions and 0 deletions

View file

@ -2070,6 +2070,17 @@
NSString *encodedURL = [url.absoluteString stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]];
NSString *firefoxURL = [NSString stringWithFormat:@"%@%@", @"firefox://open-url?url=", encodedURL];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:firefoxURL] options:@{} completionHandler:nil];
} else if ([storyBrowser isEqualToString:@"edge"]){
NSString *edgeURL;
NSRange prefix = [[url absoluteString] rangeOfString: @"http"];
if (NSNotFound != prefix.location) {
edgeURL = [[url absoluteString]
stringByReplacingCharactersInRange: prefix
withString: @"microsoft-edge-http"];
}
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:edgeURL] options:@{} completionHandler:nil];
} else if ([storyBrowser isEqualToString:@"inappsafari"]) {
[self showSafariViewControllerWithURL:url useReader:NO];
} else if ([storyBrowser isEqualToString:@"inappsafarireader"]) {

View file

@ -726,6 +726,7 @@
<string>Chrome</string>
<string>Opera Mini</string>
<string>Firefox</string>
<string>Edge</string>
</array>
<key>DefaultValue</key>
<string>inappsafari</string>
@ -738,6 +739,7 @@
<string>chrome</string>
<string>opera_mini</string>
<string>firefox</string>
<string>edge</string>
</array>
<key>Key</key>
<string>story_browser</string>

View file

@ -746,6 +746,7 @@
<string>Chrome</string>
<string>Opera Mini</string>
<string>Firefox</string>
<string>Edge</string>
</array>
<key>DefaultValue</key>
<string>inappsafari</string>
@ -758,6 +759,7 @@
<string>chrome</string>
<string>opera_mini</string>
<string>firefox</string>
<string>edge</string>
</array>
<key>Key</key>
<string>story_browser</string>