-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclicksign.html
More file actions
64 lines (56 loc) · 1.73 KB
/
clicksign.html
File metadata and controls
64 lines (56 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>iOS e JS</title>
<style type="text/css">
* {
font-size: 40px;
}
</style>
</head>
<body>
<div style="margin-top: 100px">
<h1>Testes malandros marotos</h1><br/>
<div><input type="button" value="call js alert" onclick="callJsAlert()"></div>
<br/>
<div><input type="button" value="Call js confirm" onclick="callJsConfirm()"></div><br/>
</div>
<br/>
<div>
<div><input type="button" value="Call Js prompt " onclick="callJsInput()"></div><br/>
<div><input type="button" value="Swift inject js" onclick="showAlert()"></div><br/>
<div>Click AQUI mano: <a href="http://www.clicksign.com">Acessar ClickSign</a></div>
</div>
<br/>
<div id="SwiftDiv">
<span id="jsParamFuncSpan" style="color: red; font-size: 50px;"></span>
</div>
<script type="text/javascript">
function callJsAlert() {
alert('Objective-C alert');
window.webkit.messageHandlers.AppModel.postMessage({body: 'JS ALERT'});
}
function callJsConfirm() {
if (confirm('confirm', 'Objective-C alert')) {
document.getElementById('jsParamFuncSpan').innerHTML
= 'true';
} else {
document.getElementById('jsParamFuncSpan').innerHTML
= 'false';
}
window.webkit.messageHandlers.AppModel.postMessage({body: 'JS ALERT'});
}
function callJsInput() {
var response = prompt('Olá Maluco', 'Digite seu nome:');
document.getElementById('jsParamFuncSpan').innerHTML = response;
window.webkit.messageHandlers.AppModel.postMessage({body: response});
}
var jsParamFunc = function(argument) {
document.getElementById('jsParamFuncSpan').innerHTML
= argument['name'];
}
showAler();
</script>
</body>
</html>