Skip to content

Instantly share code, notes, and snippets.

@michenriksen
Created November 14, 2016 13:34
Show Gist options
  • Save michenriksen/3ace5b2714097d05ea18bc843b1719ad to your computer and use it in GitHub Desktop.
Save michenriksen/3ace5b2714097d05ea18bc843b1719ad to your computer and use it in GitHub Desktop.
Detecting Hunchly
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Detecting Hunchly</title>
</head>
<body>
<div id="canary">
John Doe [email protected] 888444333
</div>
<script type="text/javascript">
setTimeout(function() {
var selectors = document.querySelectorAll("#canary mark.hunchly");
if (selectors.length === 0) {
console.log("No Hunchly selectors found in canary");
} else {
console.log("Found " + selectors.length + " Hunchly selector(s) in canary");
selectors.forEach(function(item, i) {
console.info("Investigator is interested in: " + item.textContent);
});
alert("Hi there, investigator!");
}
}, 200);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment