שיתוף | תוסף+ סקריפט לאזהרה לפני דיסלייק
-
@שלמה-רביב
הפכתי עם Gemini 3.1 Pro Preview לסקריפט טמפרמונקי:// ==UserScript== // @name מתמחים טופ - אישור דיסלייק // @namespace http://tampermonkey.net/ // @version 1.0.0 // @description מוסיף חלון אישור לפני מתן דיסלייק באתר מתמחים טופ // @author שלמה רביב וGemini 3.1 Pro Preview // @match *://*.mitmachim.top/* // @match *://mitmachim.top/* // @grant none // @run-at document-idle // ==/UserScript== (function () { "use strict"; const DISLIKE_SELECTORS =[ '[component="post/downvote"]', '[data-component="post/downvote"]', '[class*="downvote"]', '[class*="dislike"]', '[id*="dislike"]', 'i.fa-thumbs-down', ]; const SEL = DISLIKE_SELECTORS.join(", "); let _confirming = false; let _pendingTarget = null; let _dialog = null; function buildDialog() { if (_dialog) return; _dialog = document.createElement("dialog"); _dialog.id = "mtop-dialog"; _dialog.innerHTML = ` <style> @import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;500;700&display=swap'); #mtop-dialog { border: none; border-radius: 18px; padding: 36px 40px 32px; width: min(440px, 90vw); box-shadow: 0 24px 60px rgba(0,0,0,0.25); text-align: center; font-family: 'Heebo', Arial, sans-serif; direction: rtl; } #mtop-dialog::backdrop { background: rgba(10,15,30,0.55); backdrop-filter: blur(6px); } #mtop-icon { width: 68px; height: 68px; background: linear-gradient(135deg,#fff1f1,#ffd6d6); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 22px; color: #e53e3e; box-shadow: 0 0 0 8px rgba(229,62,62,0.08); } #mtop-dialog h2 { font-size:1.3rem; font-weight:700; color:#1a202c; margin:0 0 10px; } #mtop-dialog p { font-size:1rem; color:#4a5568; margin:0 0 28px; } #mtop-btns { display:flex; gap:12px; justify-content:center; flex-direction:row-reverse; } #mtop-btns button { flex:1; max-width:180px; padding:13px 20px; border-radius:12px; font-size:0.95rem; font-weight:600; font-family:inherit; cursor:pointer; border:none; transition: background 0.15s, transform 0.12s; } #mtop-cancel { background:#f0f4f8; color:#4a5568; } #mtop-cancel:hover { background:#e2e8f0; transform:translateY(-1px); } #mtop-confirm { background: linear-gradient(135deg,#e53e3e,#c53030); color: #fff; box-shadow: 0 4px 14px rgba(229,62,62,.35); } #mtop-confirm:hover { background: linear-gradient(135deg,#fc5c5c,#e53e3e); transform:translateY(-1px); } /* תמיכה במצב כהה */ @media (prefers-color-scheme: dark) { #mtop-dialog { background:#1e2535; } #mtop-dialog h2 { color:#e2e8f0; } #mtop-dialog p { color:#94a3b8; } #mtop-cancel { background:#2d3748; color:#cbd5e0; } #mtop-cancel:hover { background:#4a5568; } } </style> <div id="mtop-icon"> <svg width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3H10Z"/> <path d="M17 2h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"/> </svg> </div> <h2>אישור דיסלייק</h2> <p>האם אתה בטוח שברצונך לתת דיסלייק?</p> <div id="mtop-btns"> <button id="mtop-cancel">ביטול</button> <button id="mtop-confirm">כן, תן דיסלייק</button> </div> `; document.body.appendChild(_dialog); _dialog.querySelector("#mtop-confirm").addEventListener("click", () => { _dialog.close(); if (_pendingTarget) { _confirming = true; _pendingTarget.click(); setTimeout(() => { _confirming = false; }, 600); } _pendingTarget = null; }); _dialog.querySelector("#mtop-cancel").addEventListener("click", () => { _dialog.close(); _pendingTarget = null; }); } // ============================================================ // יירוט דיסלייק // ============================================================ document.addEventListener("click", (e) => { if (_confirming) return; const el = e.target?.closest?.(SEL); if (!el) return; e.preventDefault(); e.stopImmediatePropagation(); _pendingTarget = el; buildDialog(); _dialog.showModal(); }, true); console.log("[מתמחים טופ] v5 dialog ✓ (Tampermonkey Version)"); })();@יאנג-בוי איך מתקינים את הסקריפט?
-
@יאנג-בוי איך מתקינים את הסקריפט?
@חובבן-מקצועי
https://mitmachim.top/post/898325
ליצור סקריפט חדש, למחוק את התוכן ולהדביק את מה שהבאתי. -
@מטען-נייד
ובנוסף, כשעושים סקריפט נכון הוא יותר פשוט להתקנה מאשר תוסף במצב מפתחים (להוריד, לחלץ, להוסיף את התיקיה, ולאשר את האזהרה).@שלמה-רביב אם כבר הוספת (ותודה על הקרדיט) אולי תעלה את זה כקישור קבוע ומתעדכן במידת הצורך?
אז זה באמת יהיה פשוט יותר מהתקנת תוסף. -
@מטען-נייד
ובנוסף, כשעושים סקריפט נכון הוא יותר פשוט להתקנה מאשר תוסף במצב מפתחים (להוריד, לחלץ, להוסיף את התיקיה, ולאשר את האזהרה).@שלמה-רביב אם כבר הוספת (ותודה על הקרדיט) אולי תעלה את זה כקישור קבוע ומתעדכן במידת הצורך?
אז זה באמת יהיה פשוט יותר מהתקנת תוסף. -
ק קראנץ' ונילה התייחס לנושא זה
-
@שלמה-רביב התקדם משהו?
אפשרי לעשות את זה לאנדרואיד? -
@שלמה-רביב התקדם משהו?
אפשרי לעשות את זה לאנדרואיד?@המתכנת-התותח @קראנץ-ונילה העלה אפליקציה להריץ תוספים לאנדרואיד,
הועלה כאן. -
@המתכנת-התותח @קראנץ-ונילה העלה אפליקציה להריץ תוספים לאנדרואיד,
הועלה כאן.@שלמה-רביב זה לא אפליקציה שמריצה תוספים, זה דפדפן לכל דבר ועניין ויש בו אפשרות לתוספים
אבל זה רק בדפדפן הזה..
בכל דפדפן אחר (כמו כרום) זה לא עוזר.. -
@שלמה-רביב זה לא אפליקציה שמריצה תוספים, זה דפדפן לכל דבר ועניין ויש בו אפשרות לתוספים
אבל זה רק בדפדפן הזה..
בכל דפדפן אחר (כמו כרום) זה לא עוזר..@שניאור-שמח חבל...
אולי אם אפשרי לבנות אפליקציה שתעשה את זה אולי הייתי בונה באמת, זה מאוד שימושי.
@המתכנת-התותח אז כרגע אין פתרון אחר חוץ מלהתקין את הדפדפן ההוא. -
@שניאור-שמח חבל...
אולי אם אפשרי לבנות אפליקציה שתעשה את זה אולי הייתי בונה באמת, זה מאוד שימושי.
@המתכנת-התותח אז כרגע אין פתרון אחר חוץ מלהתקין את הדפדפן ההוא.@שלמה-רביב סקריפט אפשר להריץ על אנדרואיד?
-
@שלמה-רביב סקריפט אפשר להריץ על אנדרואיד?
@המתכנת-התותח כן.