Created
November 14, 2016 13:34
-
-
Save michenriksen/3ace5b2714097d05ea18bc843b1719ad to your computer and use it in GitHub Desktop.
Detecting Hunchly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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