Lovoo Auto Like with Stop Condition and Modern UI

Automates "Like" clicks on Lovoo, shows a modern UI for each like, waits before clicking, and stops if "Likes are exhausted" message appears or profile is incomplete

  1. // ==UserScript==
  2. // @name Lovoo Auto Like with Stop Condition and Modern UI
  3. // @namespace Tempermonkey Scripts
  4. // @match https://**.lovoo.com/*
  5. // @grant none
  6. // @version 1.1
  7. // @author Manu OVG
  8. // @license MIT
  9. // @description Automates "Like" clicks on Lovoo, shows a modern UI for each like, waits before clicking, and stops if "Likes are exhausted" message appears or profile is incomplete
  10. // ==/UserScript==
  11.  
  12. // Function to simulate a "Like" click
  13. async function autoLike() {
  14. // Check if the message "Tes « j’aime » sont épuisés" is displayed
  15. const noMoreLikesMessage = document.querySelector('.space-before.space-after.h3.u-text-center.u-padding-top-sm');
  16. if (noMoreLikesMessage && noMoreLikesMessage.textContent.includes('Tes « j’aime » sont épuisés')) {
  17. // Display a modern "No more likes" notification
  18. showNotification("No more likes available. Stopping...");
  19. console.log("No more likes available. Stopping script.");
  20. return; // Stop the script if the message is found
  21. }
  22.  
  23. // Check if the profile photo upload message is present
  24. const photoRequiredMessage = document.querySelector('p');
  25. if (photoRequiredMessage && photoRequiredMessage.textContent.includes('Tu n\'obtiendras malheureusement rien sans photo de profil')) {
  26. // Display a modern "No profile photo" notification
  27. showNotification("You need to upload a profile photo to like users. Stopping...");
  28. console.log("Profile photo required. Stopping script.");
  29. return; // Stop the script if the message is found
  30. }
  31.  
  32. // Check if the profile photo upload button is present (as a fallback)
  33. const photoUploadButton = document.querySelector('div.o-button.o-button--gender');
  34. if (photoUploadButton) {
  35. // Display a modern "No profile photo" notification
  36. showNotification("You need to upload a profile photo to like users. Stopping...");
  37. console.log("Profile photo required. Stopping script.");
  38. return; // Stop the script if the button is found
  39. }
  40.  
  41. // Find all "Like" buttons
  42. const likeButtons = document.querySelectorAll('span[data-automation-id="vote-yes-button"]');
  43.  
  44. // If there are "Like" buttons, click one
  45. if (likeButtons.length > 0) {
  46. // Get the first "Like" button (you can modify this if you want to target a specific user)
  47. const likeButton = likeButtons[0];
  48.  
  49. // Show the "Liked" UI notification first
  50. showNotification("You've liked a user!");
  51.  
  52. // Wait 1 second to display the notification
  53. setTimeout(() => {
  54. // Now simulate the click after the delay
  55. likeButton.click();
  56. }, 1000); // Show the notification for 1 second before clicking the "Like" button
  57. }
  58.  
  59. // Wait for 1 to 3 seconds to simulate a delay before clicking again
  60. const delay = Math.floor(Math.random() * 2000) + 1000; // Random delay between 1-3 seconds
  61. setTimeout(autoLike, delay);
  62. }
  63.  
  64. // Function to show a modern UI notification
  65. function showNotification(message) {
  66. // Create the notification element
  67. const notification = document.createElement('div');
  68. notification.innerHTML = `
  69. <div style="position: fixed; top: 20px; right: 20px; background-color: #4CAF50; color: white; padding: 15px 25px; border-radius: 10px; font-family: Arial, sans-serif; font-size: 16px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); z-index: 9999;">
  70. <strong>${message}</strong>
  71. </div>
  72. `;
  73.  
  74. // Append the notification to the body
  75. document.body.appendChild(notification);
  76.  
  77. // Automatically remove the notification after 3 seconds
  78. setTimeout(() => {
  79. notification.remove();
  80. }, 3000);
  81. }
  82.  
  83. // Start the auto-like function after the page is loaded
  84. window.addEventListener('load', () => {
  85. setTimeout(autoLike, 1000); // Start after a 1-second delay to ensure the page is fully loaded
  86. });