diff --git a/Example/ReCaptcha/ViewController.swift b/Example/ReCaptcha/ViewController.swift index 893a8b6..486f516 100644 --- a/Example/ReCaptcha/ViewController.swift +++ b/Example/ReCaptcha/ViewController.swift @@ -16,7 +16,7 @@ import UIKit class ViewController: UIViewController { fileprivate static let webViewTag = 123 - // swiftlint:disable force_try + // swiftlint:disable:next force_try fileprivate let recaptcha = try! ReCaptcha() fileprivate var disposeBag = DisposeBag() diff --git a/ReCaptcha/Assets/recaptcha.html b/ReCaptcha/Assets/recaptcha.html index a6361f2..b49e00b 100644 --- a/ReCaptcha/Assets/recaptcha.html +++ b/ReCaptcha/Assets/recaptcha.html @@ -12,7 +12,12 @@ }; var execute = function() { + // Removes ReCaptcha dismissal when clicking outside div area + document.getElementsByTagName("div")[4].outerHTML = "" + + // Listens to changes on the div element that presents the ReCaptcha challenge observeDOM(document.getElementsByTagName("div")[3], function() { + console.log({action: "showReCaptcha"}); window.webkit.messageHandlers.recaptcha.postMessage({action: "showReCaptcha"}); });