// ==UserScript== // @name TikTok Auto Like // @namespace http://tampermonkey.net/ // @version 1.9 // @description Automatically clicks the like button on TikTok live pages with a draggable and collapsible UI. // @author therealbeanos. // @match https://www.tiktok.com/* // @grant none // @license MIT // @downloadURL none // ==/UserScript== (function() { 'use strict'; let intervalId = null; let clickInterval = 200; let isMinimized = false; let isDragging = false; let offsetX, offsetY; let rateLimited = false; function autoClickLikeButton() { const likeButtonContainer = document.querySelector('.css-hm4yna-DivLikeContainer.ebnaa9i0'); if (likeButtonContainer) { const likeButton = likeButtonContainer.querySelector('.css-1mk0i7a-DivLikeBtnIcon.ebnaa9i3'); if (likeButton && !rateLimited) { likeButton.click(); } } } function startAutoClicking() { if (!intervalId) { intervalId = setInterval(autoClickLikeButton, clickInterval); const startButton = document.getElementById('start-button'); const stopButton = document.getElementById('stop-button'); if (startButton) startButton.style.backgroundColor = '#00f593'; if (stopButton) stopButton.style.backgroundColor = ''; updateLiveStatus('Live', '#00f593'); } } function stopAutoClicking() { if (intervalId) { clearInterval(intervalId); intervalId = null; const startButton = document.getElementById('start-button'); const stopButton = document.getElementById('stop-button'); if (stopButton) stopButton.style.backgroundColor = '#ff2d55'; if (startButton) startButton.style.backgroundColor = ''; updateLiveStatus('Stopped', '#ff2d55'); } } function updateLiveStatus(status, color) { const statusElement = document.getElementById('live-status'); const rateLimitMessage = document.getElementById('rate-limit-message'); if (statusElement) { statusElement.textContent = `Status: ${status}`; statusElement.style.color = color; statusElement.style.textAlign = 'center'; } if (rateLimitMessage) { rateLimitMessage.style.textAlign = 'center'; } } function createUI() { const uiContainer = document.querySelector('#auto-click-ui'); if (!uiContainer) { const uiContainer = document.createElement('div'); uiContainer.id = 'auto-click-ui'; uiContainer.style.position = 'absolute'; uiContainer.style.top = '50px'; uiContainer.style.right = '10px'; uiContainer.style.backgroundColor = '#ffffff'; uiContainer.style.border = '1px solid #ddd'; uiContainer.style.borderRadius = '8px'; uiContainer.style.boxShadow = '0 4px 6px rgba(0, 0, 0, 0.1)'; uiContainer.style.padding = '15px'; uiContainer.style.zIndex = 1000; uiContainer.style.fontFamily = 'Arial, sans-serif'; uiContainer.style.fontSize = '14px'; uiContainer.style.color = '#333'; uiContainer.style.transition = 'max-height 0.3s ease'; uiContainer.style.overflow = 'hidden'; uiContainer.innerHTML = `