-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathSSWebBrowsing.h
52 lines (37 loc) · 1.34 KB
/
SSWebBrowsing.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#import <Cocoa/Cocoa.h>
@interface NSString (FirefoxQuicksearch)
/*!
@brief To fix a stupid thing that happens when opening a Firefox
"quicksearch" URL
@details
@result
*/
- (NSString*)stringByFixingFirefoxQuicksearch ;
@end
@interface SSWebBrowsing : NSObject {
}
+ (NSString*)defaultBrowserDisplayName ;
+ (NSString*)defaultBrowserBundleIdentifier ;
/*!
@details In macOS 10.10, there is Apple Bug 19642555, which causes
-[NSWorkspace openURLs:::::] to fail (and indeed return NO, if you rapid-fire
it too quickly. Experimenting on my 2013 13 inch MacBook Air, opening 13 URLs
in Safari, I find that a 50-100 millisecond delay is necessary between
invocations of this method to avoid failures. To be safe, I recommend using
500 milliseconds; since web pages generally take way longer than that to load,
user experience is not affected. Apple Bug 19642555 is detailed here:
http://openradar.appspot.com/19642555
@param browserBundleIdentifier bundle identifier of browser to
be used. Pass nil to use the user's default browser.
*/
+ (void)browseToURLString:(NSString*)url
browserBundleIdentifier:(NSString*)browserBundleIdentifier
activate:(BOOL)activate ;
/*!
@brief
@details Downloads the favicon from the internet
@param domain
@result
*/
+ (NSImage*)faviconForDomain:(NSString*)domain ;
@end