mirror of
https://github.com/hanzoai/cuckoo.git
synced 2026-10-30 18:41:54 +00:00
53 lines
1.5 KiB
HTML
53 lines
1.5 KiB
HTML
<!doctype html>
|
|
<html class="no-js" lang="">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
<title></title>
|
|
<meta name="description" content="">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
|
<script src="jquery-1.11.3.min.js"></script>
|
|
<script src="cuckoo.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="somelink">some link</div>
|
|
<a id="linktobookmark" href="#bookmark">link to bookmark</a>
|
|
<div id="bookmark">
|
|
</div>
|
|
<div id="clickablediv">clickable div</div>
|
|
<div id="dontstopmenow">Don't Stop Me Now</div>
|
|
<input id="changeinput" value="blah"></input>
|
|
<p id="result"></p>
|
|
<p id="rejected"></p>
|
|
<script>
|
|
$('#clickablediv').on('click', function(event){})
|
|
$('#clickablediv').on('click', function(event){})
|
|
|
|
$('#dontstopmenow').on('click', function(event){
|
|
event.stopPropagation()
|
|
event.stopImmediatePropagation()
|
|
event.preventDefault()
|
|
return false
|
|
})
|
|
|
|
cuckoo.Egg = function(event) {
|
|
type = event.type
|
|
|
|
if (
|
|
type !== 'click' &&
|
|
type !== 'submit' &&
|
|
type !== 'hashchange'
|
|
) {
|
|
document.getElementById('rejected').innerHTML = event.type + 'ed: ' + event.target.id
|
|
return
|
|
}
|
|
|
|
document.getElementById('result').innerHTML = event.type + 'ed: ' + event.target.id
|
|
}
|
|
cuckoo.Target('change click hashchange')
|
|
</script>
|
|
</body>
|
|
</html>
|