This script will automatically like posts on Facebook without needing to install any additional applications. The script is designed to mimic human behavior, ensuring that your account remains safe from being banned. Simply copy and paste this script into your browser's console. I personally use Chrome, and this script is safe to use—it does not collect any of your data. You can verify its safety yourself, as it consists of only a few lines of code.
How to Use:
- Open Facebook in your Chrome browser.
- Right-click on the page and select "Inspect" or press
Ctrl+Shift+I
to open the Developer T - Go to the "Saurces" tab.
- Click Snippet, make new snippet;
- copy the script auto like facebook to editor on right
- on file your made on snippet, click right and click run
The script will now run , automatically liking posts as if you were doing it manually. Feel free to monitor the console for messages indicating that posts are being liked.
Disclaimer: This script is provided for educational purposes. Use it responsibly and be aware of Facebook's terms of service.
Function to check if the element is in view
function isElementInViewport(el) {
let rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}
Function to get all elements in the viewport
function getAllElementsInViewport() {
// Get all elements in the document
let allElements = document.querySelectorAll('div[aria-label=Like]:not(.sudah)');
// Array to store elements in the viewport
let elementsInViewport = [];
// Iterate through all elements and check if they are in the viewport
allElements.forEach(element => {
if (isElementInViewport(element)) {
elementsInViewport.push(element);
}
});
return elementsInViewport;
}
Add a scroll event listener to the window
window.addEventListener('scroll', function() {
// Get all elements in the viewport when the user scrolls
let elementsInViewport = getAllElementsInViewport();
// Iterate through the NodeList and check for the attribute and value
console.log(elementsInViewport.length+' like button availible on vieport')
let no = 0
elementsInViewport.forEach(element => {
no +=1;
element.classList.add('sudah');
let myArray = Array.from({ length: 20 }, () => getRandomNumber(0, 1));
let randomElement = myArray[Math.floor(Math.random() * myArray.length)];
if(randomElement==1){
element.click();
console.log(no+" element clicked")
}else{
console.log(no+" element not clicked")
}
});
});
Function to scroll the page by 40 pixels
function scrollBy40px() {
let myArray = Array.from({ length: 20 }, () => getRandomNumber(400, 1000));
let randomElement = myArray[Math.floor(Math.random() * myArray.length)];
window.scrollBy(0, randomElement); // Scroll vertically by 40 pixels
doit()
}
function doit() {
let myArray = Array.from({ length: 20 }, () => getRandomNumber(800, 10000));
let randomElement = myArray[Math.floor(Math.random() * myArray.length)];
console.log('windows will scroll after random mili second. wait about '+randomElement)
setTimeout(scrollBy40px, randomElement);
}
function getRandomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
doit()
// Function to check if the element is in view
function isElementInViewport(el) {
let rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}
// Function to get all elements in the viewport
function getAllElementsInViewport() {
// Get all elements in the document
let allElements = document.querySelectorAll('div[aria-label=Like]:not(.sudah)');
// Array to store elements in the viewport
let elementsInViewport = [];
// Iterate through all elements and check if they are in the viewport
allElements.forEach(element => {
if (isElementInViewport(element)) {
elementsInViewport.push(element);
}
});
return elementsInViewport;
}
// Add a scroll event listener to the window
window.addEventListener('scroll', function() {
// Get all elements in the viewport when the user scrolls
let elementsInViewport = getAllElementsInViewport();
// Iterate through the NodeList and check for the attribute and value
console.log(elementsInViewport.length+' like button availible on vieport')
let no = 0
elementsInViewport.forEach(element => {
no +=1;
element.classList.add('sudah');
let myArray = Array.from({ length: 20 }, () => getRandomNumber(0, 1));
let randomElement = myArray[Math.floor(Math.random() * myArray.length)];
if(randomElement==1){
element.click();
console.log(no+" element clicked")
}else{
console.log(no+" element not clicked")
}
});
});
// Function to scroll the page by 40 pixels
function scrollBy40px() {
let myArray = Array.from({ length: 20 }, () => getRandomNumber(400, 1000));
let randomElement = myArray[Math.floor(Math.random() * myArray.length)];
window.scrollBy(0, randomElement); // Scroll vertically by 40 pixels
doit()
}
function doit() {
let myArray = Array.from({ length: 20 }, () => getRandomNumber(800, 10000));
let randomElement = myArray[Math.floor(Math.random() * myArray.length)];
console.log('windows will scroll after random mili second. wait about '+randomElement)
setTimeout(scrollBy40px, randomElement);
}
function getRandomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
doit()
-----------------------------------------------------
for more, just watch this video
No comments:
Post a Comment