Skip to content

Commit

Permalink
Bring support for local files
Browse files Browse the repository at this point in the history
  • Loading branch information
Iman Zarrabian committed Mar 5, 2015
1 parent c46096e commit efc661e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NJKWebViewProgress/NJKWebViewProgress.m
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)

BOOL isTopLevelNavigation = [request.mainDocumentURL isEqual:request.URL];

BOOL isHTTP = [request.URL.scheme isEqualToString:@"http"] || [request.URL.scheme isEqualToString:@"https"];
if (ret && !isFragmentJump && isHTTP && isTopLevelNavigation) {
BOOL isHTTPOrLocalFile = [request.URL.scheme isEqualToString:@"http"] || [request.URL.scheme isEqualToString:@"https"] || [request.URL.scheme isEqualToString:@"file"];
if (ret && !isFragmentJump && isHTTPOrLocalFile && isTopLevelNavigation) {
_currentURL = request.URL;
[self reset];
}
Expand Down

0 comments on commit efc661e

Please sign in to comment.