Skip to content

Commit

Permalink
Remove bookmarklet support (#5618)
Browse files Browse the repository at this point in the history
  • Loading branch information
garvankeeley committed Oct 17, 2019
1 parent fd6c376 commit bd1de8b
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,14 @@ extension BrowserViewController: WKNavigationDelegate {
return
}

if url.scheme == "javascript", navigationAction.request.isPrivileged {
decisionHandler(.cancel)
if let javaScriptString = url.absoluteString.replaceFirstOccurrence(of: "javascript:", with: "").removingPercentEncoding {
webView.evaluateJavaScript(javaScriptString)
}
return
}
// Disabled due to https://bugzilla.mozilla.org/show_bug.cgi?id=1588928
// if url.scheme == "javascript", navigationAction.request.isPrivileged {
// decisionHandler(.cancel)
// if let javaScriptString = url.absoluteString.replaceFirstOccurrence(of: "javascript:", with: "").removingPercentEncoding {
// webView.evaluateJavaScript(javaScriptString)
// }
// return
// }

// Second special case are a set of URLs that look like regular http links, but should be handed over to iOS
// instead of being loaded in the webview. Note that there is no point in calling canOpenURL() here, because
Expand Down

0 comments on commit bd1de8b

Please sign in to comment.