Skip to content

Commit

Permalink
Merge pull request #39 from imanzarrabian/master
Browse files Browse the repository at this point in the history
Bring support for local files
  • Loading branch information
ninjinkun committed Mar 26, 2015
2 parents c46096e + efc661e commit 078f3b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions NJKWebViewProgress/NJKWebViewProgress.m
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 078f3b7

Please sign in to comment.