צפייה ברשימות צינתוקים בהקלדת list_tzintuk=
-
קוד שאתה מכניס מפתח של בחירת רשימת צינתוקים מציג לך את רשימות הצינתוקים במערכת שלך הקוד עובד על תוסף tampermonkey
// ==UserScript== // @name Yemot Tzintuk List Helper - Final Fix // @namespace http://tampermonkey.net/ // @version 1.2 // @description תיקון זיהוי טוקן וטעינת רשימות צינתוקים // @author Gemini Netfree // @match https://*.call2all.co.il/* // @grant GM_xmlhttpRequest // @connect self // @connect *.call2all.co.il // ==/UserScript== (function () { 'use strict'; let tzintukLists = []; const triggerKey = "list_tzintuk="; const box = document.createElement("div"); box.style.cssText = "position: absolute; background: white; border: 1px solid #aaa; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); padding: 5px; display: none; z-index: 10000; max-height: 250px; overflow-y: auto; min-width: 200px; font-family: Arial, sans-serif; direction: rtl; text-align: right; border-radius: 4px;"; document.body.appendChild(box); function getToken() { // 1. חיפוש ב-URL const urlParams = new URLSearchParams(window.location.search); let token = urlParams.get('token'); // 2. חיפוש בעוגיות (Cookies) if (!token) { const cookieToken = document.cookie.split('; ').find(row => row.startsWith('token=')); if (cookieToken) token = cookieToken.split('=')[1]; } // 3. חיפוש ב-Storage if (!token) token = localStorage.getItem('token') || sessionStorage.getItem('token'); return token; } function fetchTzintukLists(callback) { const token = getToken(); let apiUrl = `${window.location.origin}/ym/ws.php?ws=TzintukimListManagement&action=getlists`; // אם נמצא טוקן, נוסיף אותו. אם לא - ננסה בלי (כמו בקוד 2) if (token) { apiUrl += `&token=${token}`; } console.log("Yemot Helper: Fetching lists from:", apiUrl); GM_xmlhttpRequest({ method: "GET", url: apiUrl, headers: { 'Accept': 'application/json' }, onload: function(response) { try { const jsonData = JSON.parse(response.responseText); if (jsonData.responseStatus === "OK" && jsonData.lists) { tzintukLists = jsonData.lists; if (callback) callback(true); } else { console.warn("Yemot Helper: API returned error", jsonData); if (callback) callback(false); } } catch (e) { console.error("Yemot Helper: Parse error", e); if (callback) callback(false); } }, onerror: function() { if (callback) callback(false); } }); } function renderList(textarea) { box.innerHTML = "<div style='font-weight:bold; border-bottom:1px solid #ccc; margin-bottom:5px; padding-bottom:3px; font-size:12px;'>בחר רשימת צינתוק:</div>"; if (tzintukLists.length === 0) { box.innerHTML += "<div id='tz-loading-msg' style='padding:5px; color:blue; font-size:11px;'>טוען נתונים...</div>"; fetchTzintukLists((success) => { if (success && tzintukLists.length > 0) { renderList(textarea); } else { const msg = document.getElementById('tz-loading-msg'); if (msg) msg.textContent = "לא נמצאו רשימות צינתוק במערכת."; if (msg) msg.style.color = "red"; } }); } else { tzintukLists.forEach((list) => { const item = document.createElement("div"); item.textContent = `${list.listName} (${list.subscribers} רשומים)`; item.style.cssText = "cursor: pointer; padding: 6px; border-bottom: 1px solid #eee; font-size: 13px;"; item.onmouseover = () => item.style.backgroundColor = "#f0f0f0"; item.onmouseout = () => item.style.backgroundColor = "transparent"; item.onmousedown = (e) => { e.preventDefault(); insert(textarea, list.listName); box.style.display = "none"; }; box.appendChild(item); }); } } function showBox(textarea) { const rect = textarea.getBoundingClientRect(); box.style.top = (rect.top + window.scrollY + 20) + "px"; box.style.left = (rect.left + window.scrollX) + "px"; box.style.display = "block"; renderList(textarea); } function insert(textarea, value) { const start = textarea.selectionStart; const end = textarea.selectionEnd; textarea.value = textarea.value.substring(0, start) + value + textarea.value.substring(end); const newPos = start + value.length; textarea.setSelectionRange(newPos, newPos); textarea.dispatchEvent(new Event('input', { bubbles: true })); textarea.focus(); } document.addEventListener("input", (e) => { if (e.target.tagName === "TEXTAREA") { const cursor = e.target.selectionStart; const textBefore = e.target.value.substring(0, cursor); if (textBefore.endsWith(triggerKey)) { showBox(e.target); } else { box.style.display = "none"; } } }); document.addEventListener("mousedown", (e) => { if (!box.contains(e.target) && e.target.tagName !== "TEXTAREA") { box.style.display = "none"; } }); fetchTzintukLists(); })();אם יש מישהו שיכול לעשות שזה יהיה אוטמטי רק להתקין תוסף כמו זה זה יביא תועלת להרבה משתמשים אולי קרדיט על הקוד של המוזמנים לרשימה השתמשתי בו כבסיס @cubase אם תוכל להוסיף את זה לתוסף שלך