Sha256: 1bb4b907cf7bd677ceba71233b945c4e3bd5027c3dd39959ff871120f09659ab
Contents?: true
Size: 1.02 KB
Versions: 70
Compression:
Stored size: 1.02 KB
Contents
<%= render_template("lib/json2.min.js") %> <%= render_template("lib/log.js"); %> <%= render_template("lib/on_alert.js"); %> UIATarget.onAlert = function (alert) { Log.output({"output":"on alert"}); var target = UIATarget.localTarget(); target.pushTimeout(10); function dismissPrivacyAlert(retry_count) { retry_count = retry_count || 0; if (retry_count >= 5) { Log.output("Maxed out retry (5) - unable to dismiss privacy alert."); return; } try { var answer = isPrivacyAlert(alert); if (answer) { alert.buttons()[answer].tap(); } } catch (e) { Log.output("Exception while trying to touch alert. Retrying..."); if (e && typeof e.toString == 'function') { Log.output(e.toString()); } target.delay(1); dismissPrivacyAlert(retry_count + 1); } } dismissPrivacyAlert(0); target.popTimeout(); return true; };
Version data entries
70 entries across 70 versions & 2 rubygems