web-esheep
web-esheep copied to clipboard
How do i Remove a Pet once started ?
trafficstars
runnig Pet.remove() will remove sheeps most of the time, but the "black" ones wont be removed
Do you mean on the webpage? The script on the webpage is not able to create "childs" like a black sheep.
i did this to fix it: added a "sheep" prefix to the creation of div: this.id = "sheep" + Date.now() + Math.random(),
to remove all sheeps
var elements = document.querySelectorAll([id^="sheep"]);
for (let i = 0; i < elements.length; i++) {
while (elements[i].firstChild) {
elements[i].firstChild.remove()
}
}