- הוסף לסימניות
- #2,921
כמה הבהרות:
כמובן שצריך להשאיר את הדף פתוח,
ואני מצרף את אפשרות לכבות את הצליל אז בשביל לעדכן צריך לרענן ואז לעשות שוב רק לא ידרוש את ההקלדת אישור פעם נוספת. ושוב האחריות על המשתמש אני לא לוקח שום אחריות מכל סוג שהיא ואיני יודע אם זה מותר או אסור, כל אחד יעשה על דעתו ואחריותו.
קוד:// ==UserScript== // @name Auto Click Full Features // @namespace local.autoclick // @version 2.0 // @description לחיצה אוטומטית עם טיימר, צלצול ניתן לכיבוי, טווח מינימום/מקסימום, ברירת מחדל // @match https://example.com/* // <--- שנה לכתובת האתר שלך // @run-at document-idle // @grant none // ==/UserScript== (function () { 'use strict'; const SELECTOR = 'button.cart-btn-dt'; let running = false; let timerId = null; let countdownId = null; let minDelay = 120; let maxDelay = 400; let timeLeft = 0; let soundEnabled = true; function clickIfExists() { if (!running) return; const btn = document.querySelector(SELECTOR); if (btn && !btn.disabled) { btn.click(); if (soundEnabled) playSound(); console.log('[auto-click] נלחץ ב:', new Date().toLocaleTimeString()); } else { console.log('[auto-click] כפתור לא נמצא או לא זמין'); } scheduleNextClick(); } function scheduleNextClick() { if (!running) return; const delay = (Math.floor(Math.random() * (maxDelay - minDelay + 1)) + minDelay); timeLeft = delay; console.log(`[auto-click] הלחיצה הבאה בעוד ${delay} שניות`); clearInterval(countdownId); countdownDisplay.textContent = timeLeft + 's'; countdownId = setInterval(() => { if (!running) { countdownDisplay.textContent = '—'; clearInterval(countdownId); return; } if (timeLeft > 0) { timeLeft--; countdownDisplay.textContent = timeLeft + 's'; } else { countdownDisplay.textContent = '—'; clearInterval(countdownId); } }, 1000); timerId = setTimeout(clickIfExists, delay * 1000); } function start() { if (running) return; let minVal = parseInt(document.getElementById('minDelay').value, 10); let maxVal = parseInt(document.getElementById('maxDelay').value, 10); if (isNaN(minVal) || isNaN(maxVal) || minVal >= maxVal) { alert('אנא הזן ערכים תקינים (מינימום קטן ממקסימום)'); return; } if ((maxVal - minVal) < 120) { alert('הטווח קטן מ-120 שניות. חוזרים לברירת מחדל (120–400).'); minVal = 120; maxVal = 400; document.getElementById('minDelay').value = minVal; document.getElementById('maxDelay').value = maxVal; } minDelay = minVal; maxDelay = maxVal; running = true; clickIfExists(); toggleBtn.style.background = '#4caf50'; toggleBtn.textContent = '⏸ עצור'; } function stop() { running = false; clearTimeout(timerId); clearInterval(countdownId); countdownDisplay.textContent = '—'; toggleBtn.style.background = '#f44336'; toggleBtn.textContent = '▶ הפעל'; } function playSound() { const ctx = new (window.AudioContext || window.webkitAudioContext)(); const osc = ctx.createOscillator(); const gain = ctx.createGain(); osc.type = 'sine'; osc.frequency.setValueAtTime(880, ctx.currentTime); gain.gain.setValueAtTime(0.1, ctx.currentTime); osc.connect(gain); gain.connect(ctx.destination); osc.start(); osc.stop(ctx.currentTime + 0.2); } const toggleBtn = document.createElement('button'); toggleBtn.textContent = '▶ הפעל'; toggleBtn.style.position = 'fixed'; toggleBtn.style.bottom = '20px'; toggleBtn.style.right = '20px'; toggleBtn.style.zIndex = '99999'; toggleBtn.style.padding = '10px 15px'; toggleBtn.style.border = 'none'; toggleBtn.style.borderRadius = '8px'; toggleBtn.style.color = '#fff'; toggleBtn.style.cursor = 'pointer'; toggleBtn.style.background = '#f44336'; document.body.appendChild(toggleBtn); const configDiv = document.createElement('div'); configDiv.style.position = 'fixed'; configDiv.style.bottom = '100px'; configDiv.style.right = '20px'; configDiv.style.zIndex = '99999'; configDiv.style.background = '#ffff99'; configDiv.style.color = '#000'; configDiv.style.border = '2px solid #000'; configDiv.style.borderRadius = '8px'; configDiv.style.padding = '10px'; configDiv.style.fontSize = '14px'; configDiv.style.fontFamily = 'sans-serif'; configDiv.style.boxShadow = '0 0 10px rgba(0,0,0,0.4)'; configDiv.innerHTML = ` <label>מינימום (שניות): <input type="number" id="minDelay" value="${minDelay}" style="width:80px"></label><br><br> <label>מקסימום (שניות): <input type="number" id="maxDelay" value="${maxDelay}" style="width:80px"></label><br><br> <label>טיימר: <span id="countdown">—</span></label><br><br> <label><input type="checkbox" id="soundToggle" checked> צלצול פעיל</label> `; document.body.appendChild(configDiv); const countdownDisplay = document.getElementById('countdown'); const soundToggle = document.getElementById('soundToggle'); soundToggle.addEventListener('change', () => { soundEnabled = soundToggle.checked; }); toggleBtn.addEventListener('click', () => { if (running) stop(); else start(); }); })();
יש דרך לעשות את זה בטאבלט, כשאין לחצן ימני?כמה הבהרות:
כמובן שצריך להשאיר את הדף פתוח,
ואני מצרף את אפשרות לכבות את הצליל אז בשביל לעדכן צריך לרענן ואז לעשות שוב רק לא ידרוש את ההקלדת אישור פעם נוספת. ושוב האחריות על המשתמש אני לא לוקח שום אחריות מכל סוג שהיא ואיני יודע אם זה מותר או אסור, כל אחד יעשה על דעתו ואחריותו.
קוד:// ==UserScript== // @name Auto Click Full Features // @namespace local.autoclick // @version 2.0 // @description לחיצה אוטומטית עם טיימר, צלצול ניתן לכיבוי, טווח מינימום/מקסימום, ברירת מחדל // @match https://example.com/* // <--- שנה לכתובת האתר שלך // @run-at document-idle // @grant none // ==/UserScript== (function () { 'use strict'; const SELECTOR = 'button.cart-btn-dt'; let running = false; let timerId = null; let countdownId = null; let minDelay = 120; let maxDelay = 400; let timeLeft = 0; let soundEnabled = true; function clickIfExists() { if (!running) return; const btn = document.querySelector(SELECTOR); if (btn && !btn.disabled) { btn.click(); if (soundEnabled) playSound(); console.log('[auto-click] נלחץ ב:', new Date().toLocaleTimeString()); } else { console.log('[auto-click] כפתור לא נמצא או לא זמין'); } scheduleNextClick(); } function scheduleNextClick() { if (!running) return; const delay = (Math.floor(Math.random() * (maxDelay - minDelay + 1)) + minDelay); timeLeft = delay; console.log(`[auto-click] הלחיצה הבאה בעוד ${delay} שניות`); clearInterval(countdownId); countdownDisplay.textContent = timeLeft + 's'; countdownId = setInterval(() => { if (!running) { countdownDisplay.textContent = '—'; clearInterval(countdownId); return; } if (timeLeft > 0) { timeLeft--; countdownDisplay.textContent = timeLeft + 's'; } else { countdownDisplay.textContent = '—'; clearInterval(countdownId); } }, 1000); timerId = setTimeout(clickIfExists, delay * 1000); } function start() { if (running) return; let minVal = parseInt(document.getElementById('minDelay').value, 10); let maxVal = parseInt(document.getElementById('maxDelay').value, 10); if (isNaN(minVal) || isNaN(maxVal) || minVal >= maxVal) { alert('אנא הזן ערכים תקינים (מינימום קטן ממקסימום)'); return; } if ((maxVal - minVal) < 120) { alert('הטווח קטן מ-120 שניות. חוזרים לברירת מחדל (120–400).'); minVal = 120; maxVal = 400; document.getElementById('minDelay').value = minVal; document.getElementById('maxDelay').value = maxVal; } minDelay = minVal; maxDelay = maxVal; running = true; clickIfExists(); toggleBtn.style.background = '#4caf50'; toggleBtn.textContent = '⏸ עצור'; } function stop() { running = false; clearTimeout(timerId); clearInterval(countdownId); countdownDisplay.textContent = '—'; toggleBtn.style.background = '#f44336'; toggleBtn.textContent = '▶ הפעל'; } function playSound() { const ctx = new (window.AudioContext || window.webkitAudioContext)(); const osc = ctx.createOscillator(); const gain = ctx.createGain(); osc.type = 'sine'; osc.frequency.setValueAtTime(880, ctx.currentTime); gain.gain.setValueAtTime(0.1, ctx.currentTime); osc.connect(gain); gain.connect(ctx.destination); osc.start(); osc.stop(ctx.currentTime + 0.2); } const toggleBtn = document.createElement('button'); toggleBtn.textContent = '▶ הפעל'; toggleBtn.style.position = 'fixed'; toggleBtn.style.bottom = '20px'; toggleBtn.style.right = '20px'; toggleBtn.style.zIndex = '99999'; toggleBtn.style.padding = '10px 15px'; toggleBtn.style.border = 'none'; toggleBtn.style.borderRadius = '8px'; toggleBtn.style.color = '#fff'; toggleBtn.style.cursor = 'pointer'; toggleBtn.style.background = '#f44336'; document.body.appendChild(toggleBtn); const configDiv = document.createElement('div'); configDiv.style.position = 'fixed'; configDiv.style.bottom = '100px'; configDiv.style.right = '20px'; configDiv.style.zIndex = '99999'; configDiv.style.background = '#ffff99'; configDiv.style.color = '#000'; configDiv.style.border = '2px solid #000'; configDiv.style.borderRadius = '8px'; configDiv.style.padding = '10px'; configDiv.style.fontSize = '14px'; configDiv.style.fontFamily = 'sans-serif'; configDiv.style.boxShadow = '0 0 10px rgba(0,0,0,0.4)'; configDiv.innerHTML = ` <label>מינימום (שניות): <input type="number" id="minDelay" value="${minDelay}" style="width:80px"></label><br><br> <label>מקסימום (שניות): <input type="number" id="maxDelay" value="${maxDelay}" style="width:80px"></label><br><br> <label>טיימר: <span id="countdown">—</span></label><br><br> <label><input type="checkbox" id="soundToggle" checked> צלצול פעיל</label> `; document.body.appendChild(configDiv); const countdownDisplay = document.getElementById('countdown'); const soundToggle = document.getElementById('soundToggle'); soundToggle.addEventListener('change', () => { soundEnabled = soundToggle.checked; }); toggleBtn.addEventListener('click', () => { if (running) stop(); else start(); }); })();
הנושאים החמים

Reactions: לארג', פרפר משי ו-קלימנטינה3 //