Обновить Auto lead/tampermonkey scrypt61.js
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
if (data.lead) {
|
if (data.lead) {
|
||||||
fillForm(data.lead);
|
fillForm(data.lead);
|
||||||
showNotification(`? Подставлен выбранный лид. Осталось: ${data.queue_size}`);
|
showNotification(`Подставлен выбранный лид. Осталось: ${data.queue_size}`);
|
||||||
updateCounter(data.queue_size);
|
updateCounter(data.queue_size);
|
||||||
} else {
|
} else {
|
||||||
showNotification('? Ошибка при загрузке лида');
|
showNotification('? Ошибка при загрузке лида');
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
}
|
}
|
||||||
const btn = document.getElementById('lead-queue-btn');
|
const btn = document.getElementById('lead-queue-btn');
|
||||||
if (btn) {
|
if (btn) {
|
||||||
btn.innerHTML = `?? Лиды (${lastQueueSize})`;
|
btn.innerHTML = `Лиды (${lastQueueSize})`;
|
||||||
btn.style.background = lastQueueSize > 0 ? '#4CAF50' : '#9E9E9E';
|
btn.style.background = lastQueueSize > 0 ? '#4CAF50' : '#9E9E9E';
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
@@ -185,7 +185,7 @@ async function showMenu() {
|
|||||||
|
|
||||||
let menuHtml = `
|
let menuHtml = `
|
||||||
<div id="lead-menu" style="position:fixed; bottom:80px; right:20px; background:white; border:1px solid #ccc; border-radius:8px; box-shadow:0 2px 10px rgba(0,0,0,0.2); z-index:100000; width:320px; max-height:400px; overflow-y:auto;">
|
<div id="lead-menu" style="position:fixed; bottom:80px; right:20px; background:white; border:1px solid #ccc; border-radius:8px; box-shadow:0 2px 10px rgba(0,0,0,0.2); z-index:100000; width:320px; max-height:400px; overflow-y:auto;">
|
||||||
<div style="padding:10px; background:#2196F3; color:white; border-radius:8px 8px 0 0; font-weight:bold; cursor:pointer;" id="menu-header">?? Выберите лид (${list.length}) ?</div>
|
<div style="padding:10px; background:#2196F3; color:white; border-radius:8px 8px 0 0; font-weight:bold; cursor:pointer;" id="menu-header">Выберите лид (${list.length})</div>
|
||||||
<div style="max-height:350px; overflow-y:auto;">
|
<div style="max-height:350px; overflow-y:auto;">
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ async function showMenu() {
|
|||||||
// Создание кнопки
|
// Создание кнопки
|
||||||
const btn = document.createElement('button');
|
const btn = document.createElement('button');
|
||||||
btn.id = 'lead-queue-btn';
|
btn.id = 'lead-queue-btn';
|
||||||
btn.textContent = '?? Лиды (0)';
|
btn.textContent = 'Лиды (0)';
|
||||||
btn.style.cssText = `
|
btn.style.cssText = `
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 20px;
|
bottom: 20px;
|
||||||
|
|||||||
Reference in New Issue
Block a user