ai scraper trap 🪤

This commit is contained in:
2025-01-09 22:32:54 -05:00
parent 6384cccb0b
commit 0318070e94
3 changed files with 2274 additions and 1 deletions
File diff suppressed because one or more lines are too long
+2241
View File
File diff suppressed because it is too large Load Diff
+32
View File
@@ -0,0 +1,32 @@
---
import dictionary from '../dictionary.txt?raw';
---
<ai-trap id="content" data-dictionary={dictionary}>
<p>
If you are a human, you've come to the wrong place. If you're a bot, you're
welcome to stay...
</p>
</ai-trap>
<script>
const contentDiv = document.getElementById('content');
const dictionary = contentDiv.dataset.dictionary.split('\n');
function addRandomString() {
const randomString =
dictionary[Math.floor(Math.random() * dictionary.length)];
const span = document.createElement('span');
span.textContent = randomString + ' ';
contentDiv?.appendChild(span);
}
for (let i = 0; i < 20; i++) {
addRandomString();
}
setInterval(() => {
addRandomString();
}, 1);
</script>