דילוג לתוכן
  • חוקי הפורום
  • פופולרי
  • לא נפתר
  • משתמשים
  • חיפוש גוגל בפורום
  • צור קשר
עיצובים
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • ברירת מחדל (ללא עיצוב (ברירת מחדל))
  • ללא עיצוב (ברירת מחדל)
כיווץ
מתמחים טופ
  1. דף הבית
  2. כללי - עזרה הדדית
  3. שיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות כולל פרוג.

שיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות כולל פרוג.

מתוזמן נעוץ נעול הועבר כללי - עזרה הדדית
29 פוסטים 10 כותבים 315 צפיות 12 עוקבים
  • מהישן לחדש
  • מהחדש לישן
  • הכי הרבה הצבעות
תגובה
  • תגובה כנושא
התחברו כדי לפרסם תגובה
נושא זה נמחק. רק משתמשים עם הרשאות מתאימות יוכלו לצפות בו.
  • E efishesh

    @פראירי הקישור שלך לא תקין
    מבנה של קישור שבלחיצה יורד (ולא רק בפתיחה בדף חדש) הוא ככה
    [תוסף.zip] (/assets/uploads/files/1775034425464-תוסף.zip)
    רק בלי הרווח בין הסוגריים העגולות למרובעות

    פראיריפ מנותק
    פראיריפ מנותק
    פראירי
    כתב נערך לאחרונה על ידי פראירי
    #12

    @efishesh
    אני יודע אני עכשיו עובר למחשב לסדר את זה
    אני משתגע איך למחוק את זה באנדרואיד..
    עריכה: עודכן
    אשמח שתמחק שיהיה מסודר

    תגובה 1 תגובה אחרונה
    0
    • 1 מנותק
      1 מנותק
      1011
      כתב נערך לאחרונה על ידי
      #13

      אשמח לארח אצלי אם לא הסתדרת עם חשבון גוגל. ואגב אני מציע להעלות את זה לגיטהאב ככה אנשים יוכלו לתרום, כי חוסם פרסומות זה דבר דינמי שדורש עדכונים ותחזוקה באופן רציף.

      בנימין מחשביםב פראיריפ 2 תגובות תגובה אחרונה
      2
      • 1 1011

        אשמח לארח אצלי אם לא הסתדרת עם חשבון גוגל. ואגב אני מציע להעלות את זה לגיטהאב ככה אנשים יוכלו לתרום, כי חוסם פרסומות זה דבר דינמי שדורש עדכונים ותחזוקה באופן רציף.

        בנימין מחשביםב מנותק
        בנימין מחשביםב מנותק
        בנימין מחשבים
        כתב נערך לאחרונה על ידי
        #14

        @1011

        שאפו! אתה מקיים בהידור את כל דצריך וכו'...

        תגובה 1 תגובה אחרונה
        1
        • 1 1011

          אשמח לארח אצלי אם לא הסתדרת עם חשבון גוגל. ואגב אני מציע להעלות את זה לגיטהאב ככה אנשים יוכלו לתרום, כי חוסם פרסומות זה דבר דינמי שדורש עדכונים ותחזוקה באופן רציף.

          פראיריפ מנותק
          פראיריפ מנותק
          פראירי
          כתב נערך לאחרונה על ידי
          #15

          @1011
          א. תודה רבה אך בעז"ה @צדיק-0 כבר מעלה
          ב. אני בל"נ לפחות בתקופה הקרובה מתכוון להמשיך לפתח ולעקוב אחרי זה מה גם שהשתמשתי בכללים די חזקים שמותאמים לכל אתר כדי לחסום פרסומות כך שזה לא אמור להחסם בקרוב.

          ס תגובה 1 תגובה אחרונה
          2
          • פראיריפ פראירי

            @1011
            א. תודה רבה אך בעז"ה @צדיק-0 כבר מעלה
            ב. אני בל"נ לפחות בתקופה הקרובה מתכוון להמשיך לפתח ולעקוב אחרי זה מה גם שהשתמשתי בכללים די חזקים שמותאמים לכל אתר כדי לחסום פרסומות כך שזה לא אמור להחסם בקרוב.

            ס מנותק
            ס מנותק
            סוף הרחוב
            כתב נערך לאחרונה על ידי
            #16

            @פראירי עם ישראל יודה לך אם תוסיף גם את קול חי מיוזיק, בקטגוריית ניוזיק יש פרסומות.

            פראיריפ תגובה 1 תגובה אחרונה
            0
            • ס סוף הרחוב

              @פראירי עם ישראל יודה לך אם תוסיף גם את קול חי מיוזיק, בקטגוריית ניוזיק יש פרסומות.

              פראיריפ מנותק
              פראיריפ מנותק
              פראירי
              כתב נערך לאחרונה על ידי
              #17

              @סוף-הרחוב
              לא רק בניוזיק.
              וזה נמצא בגרסה 1.3

              ס תגובה 1 תגובה אחרונה
              0
              • פראיריפ פראירי

                @סוף-הרחוב
                לא רק בניוזיק.
                וזה נמצא בגרסה 1.3

                ס מנותק
                ס מנותק
                סוף הרחוב
                כתב נערך לאחרונה על ידי
                #18

                @פראירי כתב בשיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות ובפרוג:

                וזה נמצא בגרסה 1.3

                שו?

                פראיריפ תגובה 1 תגובה אחרונה
                0
                • ס סוף הרחוב

                  @פראירי כתב בשיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות ובפרוג:

                  וזה נמצא בגרסה 1.3

                  שו?

                  פראיריפ מנותק
                  פראיריפ מנותק
                  פראירי
                  כתב נערך לאחרונה על ידי
                  #19

                  @סוף-הרחוב
                  היא עוד לא עלתה.
                  בעז"ה תעלה בקרוב לגוגל בעזרת @צדיק-0

                  תגובה 1 תגובה אחרונה
                  2
                  • יאנג בויי מנותק
                    יאנג בויי מנותק
                    יאנג בוי
                    מדריכים
                    כתב נערך לאחרונה על ידי יאנג בוי
                    #20

                    בקשתי מג'מיני להמיר את הגרסה הראשונה (שהורדתי בערב חג) לטמפרמונקי.
                    בדקתי באמס ועובד מעולה, בשאר לא בדקתי.
                    אם יש ביקוש אעדכן את זה גם בהמשך (כרגע עשיתי לעצמי... לא יודע אם עוד מישהו פה הולך להשתמש בזה...)

                    רשות הדיבור לג'מיני:

                    מכיוון ש-Tampermonkey עובד קצת אחרת מתוסף כרום מלא (אין לו חלון קופץ Popup נפרד או קובץ Background שרץ ברקע כל הזמן), ביצעתי את ההתאמות הבאות:

                    1. החלון הקופץ (Popup): הומר לתפריט הפעולות המובנה של Tampermonkey (יופיעו לך כפתורי הדלקה/כיבוי בלחיצה על הסמל של Tampermonkey).
                    2. אחסון (Storage): במקום chrome.storage.local השתמשתי בפונקציות האחסון של סקריפטים GM_getValue ו-GM_setValue.
                    3. תהליכי רקע (Background): מנגנון ה-Ping של ה-15 דקות הומר לבדיקה שמתבצעת בכל טעינת עמוד רלוונטי, ששולחת Ping רק אם חלפו 15 דקות מהפעם הקודמת.
                    4. תקשורת (Fetch): הומר ל-GM_xmlhttpRequest כדי לעקוף בעיות CORS שעלולות לצוץ ללא ההרשאות המיוחדות של התוסף.
                    5. גישה למשתני חלון: נוסף שימוש ב-unsafeWindow כדי שנוכל לגשת לנגני הווידאו (videojs, flowplayer) שנמצאים בהקשר של האתר המקורי.

                    הנה הקוד המלא. פשוט צור סקריפט חדש ב-Tampermonkey והדבק את כל זה:

                    // ==UserScript==
                    // @name         SmartBlock PRO
                    // @namespace    http://tampermonkey.net/
                    // @version      1.2
                    // @description  חסימת פרסומות ווידאו חכמה - גרסת Tampermonkey
                    // @author       You
                    // @match        *://*.prog.co.il/*
                    // @match        *://*.moovitapp.com/*
                    // @match        *://*.kore.co.il/*
                    // @match        *://*.emess.co.il/*
                    // @match        *://*.jdn.co.il/*
                    // @run-at       document-start\
                    // @grant        GM_getValue
                    // @grant        GM_setValue
                    // @grant        GM_registerMenuCommand
                    // @grant        GM_xmlhttpRequest
                    // @grant        unsafeWindow
                    // @connect      next-js-chrome-exten-30q4.bolt.host
                    // ==/UserScript==
                    
                    (function() {
                        'use strict';
                    
                        const currentHost = window.location.hostname;
                        const BASE_URL = 'https://next-js-chrome-exten-30q4.bolt.host';
                        const API_URL = `${BASE_URL}/api/ad-config`;
                        const PING_URL = `${BASE_URL}/api/ping`;
                    
                        // ==========================================
                        // תפריט שליטה (במקום ה-Popup)
                        // ==========================================
                        const sitesConfig = {
                            'prog': 'פרוג (Prog)',
                            'moovit': 'מוביט (Moovit)',
                            'kore': 'כל רגע (Kore)',
                            'emess': 'קול חי (Emess)',
                            'jdn': 'חדשות JDN'
                        };
                    
                        // רישום כפתורים בתפריט של Tampermonkey
                        Object.keys(sitesConfig).forEach(site => {
                            const isEnabled = GM_getValue(site, true); // ברירת מחדל: פעיל
                            const menuTitle = `${isEnabled ? '🟢' : '🔴'} חסימה: ${sitesConfig[site]}`;
                            GM_registerMenuCommand(menuTitle, () => {
                                GM_setValue(site, !isEnabled);
                                location.reload(); // רענון הדף כדי להחיל שינויים
                            });
                        });
                    
                        // ==========================================
                        // מנגנון Background - Ping Server
                        // ==========================================
                        function handleBackgroundTasks() {
                            let clientId = GM_getValue('clientId', null);
                            if (!clientId) {
                                clientId = 'user_' + Math.random().toString(36).substr(2, 9);
                                GM_setValue('clientId', clientId);
                            }
                    
                            const lastPing = GM_getValue('lastPing', 0);
                            const now = Date.now();
                            
                            // שליחת פינג אם עברו 15 דקות
                            if (now - lastPing > 15 * 60 * 1000) {
                                GM_xmlhttpRequest({
                                    method: 'POST',
                                    url: PING_URL,
                                    headers: { 'Content-Type': 'application/json' },
                                    data: JSON.stringify({ clientId: clientId, timestamp: now }),
                                    onload: () => GM_setValue('lastPing', now),
                                    onerror: (err) => console.log('SmartBlock: Ping failed', err)
                                });
                            }
                        }
                        handleBackgroundTasks();
                    
                        // ==========================================
                        // תשתית פרסומות אישיות
                        // ==========================================
                        function injectMyAd() {
                            if (document.getElementById('smartblock-custom-ad')) return;
                            
                            GM_xmlhttpRequest({
                                method: 'GET',
                                url: API_URL,
                                onload: function(response) {
                                    try {
                                        const config = JSON.parse(response.responseText);
                                        
                                        if (!config || !config.enabled || !config.imageUrl) return;
                    
                                        const adContainer = document.createElement('div');
                                        adContainer.id = 'smartblock-custom-ad';
                                        
                                        Object.assign(adContainer.style, {
                                            position: 'fixed', zIndex: '999999', background: 'white',
                                            boxShadow: '0 10px 25px rgba(0,0,0,0.15)', borderRadius: '12px',
                                            border: '1px solid #e5e7eb', width: '300px', overflow: 'hidden',
                                            transition: 'all 0.3s ease', fontFamily: 'system-ui, sans-serif', direction: 'rtl'
                                        });
                    
                                        if (config.position === 'bottom-left') {
                                            adContainer.style.bottom = '20px'; adContainer.style.left = '20px';
                                        } else if (config.position === 'bottom-right') {
                                            adContainer.style.bottom = '20px'; adContainer.style.right = '20px';
                                        } else if (config.position === 'top-banner') {
                                            Object.assign(adContainer.style, {
                                                top: '0', left: '50%', transform: 'translateX(-50%)',
                                                width: '100%', maxWidth: '728px', borderRadius: '0'
                                            });
                                        }
                    
                                        const closeBtn = document.createElement('div');
                                        closeBtn.textContent = 'X';
                                        Object.assign(closeBtn.style, {
                                            position: 'absolute', top: '5px', right: '5px', cursor: 'pointer',
                                            background: 'rgba(0,0,0,0.1)', width: '20px', height: '20px',
                                            borderRadius: '50%', display: 'flex', alignItems: 'center',
                                            justifyContent: 'center', fontSize: '12px', fontWeight: 'bold', color: '#666'
                                        });
                                        closeBtn.onclick = (e) => { e.preventDefault(); adContainer.remove(); };
                                        adContainer.appendChild(closeBtn);
                    
                                        const adLink = document.createElement('a');
                                        adLink.href = config.linkUrl || '#';
                                        adLink.target = '_blank';
                                        adLink.style.display = 'block';
                    
                                        const adImage = document.createElement('img');
                                        adImage.src = config.imageUrl;
                                        adImage.style.cssText = 'width: 100%; display: block; height: auto;';
                                        
                                        adLink.appendChild(adImage);
                                        adContainer.appendChild(adLink);
                    
                                        if (document.body) document.body.appendChild(adContainer);
                                        else window.addEventListener('DOMContentLoaded', () => document.body.appendChild(adContainer));
                                        
                                    } catch (e) {
                                        console.log('SmartBlock: Ad parse failed.'); 
                                    }
                                }
                            });
                        }
                    
                        function runBlocker(siteName, blockLogic) {
                            if (GM_getValue(siteName, true) !== false) {
                                blockLogic();
                                injectMyAd();
                            }
                        }
                    
                        // הפניה משתנים לחלון האמיתי כדי שיהיה אפשר לתפעל נגנים בסביבת האתר
                        const uw = typeof unsafeWindow !== 'undefined' ? unsafeWindow : window;
                    
                        // ==========================================
                        // 1. חסימה לפרוג
                        // ==========================================
                        if (currentHost.includes('prog.co.il')) {
                            runBlocker('prog', () => {
                                const style = document.createElement('style');
                                style.textContent = `
                                    .samUnitWrapper, .samCodeUnit, .samItem, .samBannerUnit2, .samUnitContent,[data-xf-init="sam-unit"], [data-position*="post_below"],
                                    .prog-classifieds-banner-container, ins.adsbygoogle, 
                                    iframe[src*="googleads"], iframe[src*="doubleclick"],
                                    div[data-widget-key*="ad_"] 
                                    { display: none !important; height: 0 !important; margin: 0 !important; padding: 0 !important; visibility: hidden !important; }
                    
                                    article.message[data-author="פרוגבוט"], 
                                    article.message:has(.username:contains("פרוגבוט")) 
                                    { display: none !important; }
                                `;
                                document.documentElement.appendChild(style);
                    
                                const progObserver = new MutationObserver((mutations) => {
                                    mutations.forEach((mutation) => {
                                        mutation.addedNodes.forEach((node) => {
                                            if (node.nodeType === 1) {
                                                if (node.classList && node.classList.contains('overlay')) {
                                                    if (node.querySelector('.samItem, iframe[src*="campaigns"]')) {
                                                        const closeBtn = node.querySelector('.js-overlayClose');
                                                        if (closeBtn) closeBtn.click(); else node.remove();
                                                    }
                                                }
                                                if (node.tagName === 'ARTICLE' && node.classList.contains('message')) {
                                                    if (node.innerText.includes('פרוגבוט')) {
                                                        node.remove();
                                                    }
                                                }
                                            }
                                        });
                                    });
                                });
                                
                                const startProgObserver = () => {
                                    if (document.body) {
                                        document.querySelectorAll('article.message').forEach(post => {
                                            if (post.innerText.includes('פרוגבוט')) post.remove();
                                        });
                                        progObserver.observe(document.body, { childList: true, subtree: true });
                                    } else {
                                        requestAnimationFrame(startProgObserver);
                                    }
                                };
                                startProgObserver();
                            });
                        }
                    
                        // ==========================================
                        // 2. חסימה למוביט
                        // ==========================================
                        else if (currentHost.includes('moovitapp.com')) {
                            runBlocker('moovit', () => {
                                const style = document.createElement('style');
                                style.textContent = `mv-ad-wrapper.additional-ad-banner, mv-qr-code-banner { display: none !important; }`;
                                document.documentElement.appendChild(style);
                                function deepRemove(node) {
                                    if (!node) return;
                                    const walker = document.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, null, false);
                                    while (walker.nextNode()) {
                                        const el = walker.currentNode;
                                        const text = el.innerText || "";
                                        if (text.includes("נוסעים ב") || text.includes("משלמים באפליקציה") || text.includes("הירשמו עכשיו")) {
                                            if (el.offsetHeight < window.innerHeight / 2) el.remove();
                                        }
                                        if (el.shadowRoot) deepRemove(el.shadowRoot);
                                    }
                                }
                                window.addEventListener('load', () => setInterval(() => deepRemove(document), 1000));
                            });
                        }
                    
                        // ==========================================
                        // 3. חסימה לכל רגע / JDN / קול חי
                        // ==========================================
                        else if (currentHost.includes('kore.co.il') || currentHost.includes('jdn.co.il') || currentHost.includes('emess.co.il')) {
                            let siteKey = currentHost.includes('jdn') ? 'jdn' : (currentHost.includes('emess') ? 'emess' : 'kore');
                            runBlocker(siteKey, () => {
                                const style = document.createElement('style');
                                style.textContent = `[id^="div-gpt-ad"], .ad-slot, .jdn-ad, iframe[src*="ads"], .ad-manager-slot,
                                    .maavaron, div.banner[role="banner"], #v-0-0, #v-0-1-0, div[id^="v-0-"],
                                    aside iframe, aside div[id^="v-0-"],
                                    div[ads="true"], .videoadplayer, .ultracap, .ucapc, .uc1,
                                    div:has(> div > img[src*="clicka1.co.il"]), div:has(> div > a > img[src*="clicka1.co.il"]), 
                                    div:has(> div > .ubtn), div:has(> div > iframe[src*="jobik.co.il"]),
                                    #page > div.centered.gap_bottom > div > div > div > div:nth-child(1),
                                    #page > div.centered.gap_bottom > div > div > div:has(> div:nth-child(1) > img),
                                    div[style*="max-width: 1200px"]:has(img[src*="clicka1"]),
                                    div[class^="gc"]:has(img),
                                    figure:has(a > video), .article-content-inside a > video, a:has(video[autoplay])
                                    { display: none !important; }
                                `;
                                document.documentElement.appendChild(style);
                    
                                if (currentHost.includes('jdn.co.il') || currentHost.includes('emess.co.il')) {
                                    setInterval(() => {
                                        const flowplayers = document.querySelectorAll('.flowplayer');
                                        flowplayers.forEach(fpContainer => {
                                            if (fpContainer.classList.contains('is-cva') || fpContainer.querySelector('.fv-cva-skip') || (fpContainer.querySelector('video') && fpContainer.querySelector('video').src.includes('video_ad'))) {
                                                const nextVideoBtn = fpContainer.parentElement.querySelector('.fp-playlist-external a:nth-child(2)');
                                                if (nextVideoBtn && !nextVideoBtn.classList.contains('is-active')) {
                                                    nextVideoBtn.click();
                                                } else {
                                                    const api = uw.flowplayer && uw.flowplayer(fpContainer);
                                                    if (api && api.next) api.next();
                                                    else {
                                                        const v = fpContainer.querySelector('video');
                                                        if(v) { v.muted = true; if(v.duration) v.currentTime = v.duration; }
                                                    }
                                                }
                                            }
                                        });
                                    }, 50);
                    
                                    const msObserver = new MutationObserver((mutations) => {
                                        mutations.forEach((mutation) => {
                                            mutation.addedNodes.forEach((node) => {
                                                if (node.nodeType === 1) { 
                                                    const adVideos = node.querySelectorAll ? node.querySelectorAll('.videoadplayer, div[ads="true"] video') :[];
                                                    const selfAd = node.classList && node.classList.contains('videoadplayer') ? [node] : [];
                                                    const allAds = [...adVideos, ...selfAd];
                                                    
                                                    allAds.forEach(adVideo => {
                                                        adVideo.muted = true;
                                                        adVideo.style.display = 'none'; 
                                                        adVideo.dispatchEvent(new Event('ended', { bubbles: true }));
                                                        if(typeof uw.stopAd === 'function') uw.stopAd();
                                                        const skipBtn = document.querySelector('.skip-button');
                                                        if (skipBtn) skipBtn.click();
                                                    });
                                                }
                                            });
                                        });
                                    });
                                    
                                    const startMsObserver = () => {
                                        if(document.documentElement) msObserver.observe(document.documentElement, { childList: true, subtree: true });
                                        else requestAnimationFrame(startMsObserver);
                                    };
                                    startMsObserver();
                                }
                    
                                function hackPlayer(player) {
                                    if (player._adHackApplied) return;
                                    player._adHackApplied = true;
                                    player.ready(() => {
                                        player.trigger('nopreroll'); 
                                        if (player.ads && player.ads.settings) player.ads.settings.timeout = 1;
                                    });
                                    player.on('adstart', () => {
                                        const originalVol = player.volume();
                                        player.muted(true);
                                        if (player.ads) {
                                            if (player.ads.endLinearAdMode) player.ads.endLinearAdMode();
                                            if (player.ads.skipLinearAdMode) player.ads.skipLinearAdMode();
                                        }
                                        player.trigger('adend');
                                        player.trigger('adskip');
                                        setTimeout(() => {
                                            player.muted(false);
                                            if (originalVol) player.volume(originalVol);
                                            player.play(); 
                                        }, 50);
                                    });
                                }
                    
                                setInterval(() => {
                                    if (typeof uw.videojs !== 'undefined' && uw.videojs.getPlayers) {
                                        const players = uw.videojs.getPlayers();
                                        for (const key in players) hackPlayer(players[key]);
                                    }
                                }, 500);
                            });
                        }
                    
                    })();
                    

                    איך לשלוט בחסימות?

                    מכיוון שאין "חלון קופץ" (Popup) בטמפרמונקי, הדרך לשלוט בחסימה (לכבות/להדליק את החסימה לאתר ספציפי) היא דרך התפריט:

                    1. כנס לאחד האתרים עליהם הסקריפט עובד.
                    2. לחץ על הסמל של Tampermonkey בשורת התוספים שלך.
                    3. תראה שם רשימה של מתגים למשל: 🟢 חסימה: פרוג (Prog)
                    4. לחיצה עליו תשנה אותו ל-🔴 (כבוי) ותרענן את העמוד מיידית כדי לבטל את החסימה.
                    פראיריפ תגובה 1 תגובה אחרונה
                    4
                    • D מנותק
                      D מנותק
                      DHOC979
                      כתב נערך לאחרונה על ידי
                      #21

                      @פראירי תותח על

                      תגובה 1 תגובה אחרונה
                      0
                      • יאנג בויי יאנג בוי

                        בקשתי מג'מיני להמיר את הגרסה הראשונה (שהורדתי בערב חג) לטמפרמונקי.
                        בדקתי באמס ועובד מעולה, בשאר לא בדקתי.
                        אם יש ביקוש אעדכן את זה גם בהמשך (כרגע עשיתי לעצמי... לא יודע אם עוד מישהו פה הולך להשתמש בזה...)

                        רשות הדיבור לג'מיני:

                        מכיוון ש-Tampermonkey עובד קצת אחרת מתוסף כרום מלא (אין לו חלון קופץ Popup נפרד או קובץ Background שרץ ברקע כל הזמן), ביצעתי את ההתאמות הבאות:

                        1. החלון הקופץ (Popup): הומר לתפריט הפעולות המובנה של Tampermonkey (יופיעו לך כפתורי הדלקה/כיבוי בלחיצה על הסמל של Tampermonkey).
                        2. אחסון (Storage): במקום chrome.storage.local השתמשתי בפונקציות האחסון של סקריפטים GM_getValue ו-GM_setValue.
                        3. תהליכי רקע (Background): מנגנון ה-Ping של ה-15 דקות הומר לבדיקה שמתבצעת בכל טעינת עמוד רלוונטי, ששולחת Ping רק אם חלפו 15 דקות מהפעם הקודמת.
                        4. תקשורת (Fetch): הומר ל-GM_xmlhttpRequest כדי לעקוף בעיות CORS שעלולות לצוץ ללא ההרשאות המיוחדות של התוסף.
                        5. גישה למשתני חלון: נוסף שימוש ב-unsafeWindow כדי שנוכל לגשת לנגני הווידאו (videojs, flowplayer) שנמצאים בהקשר של האתר המקורי.

                        הנה הקוד המלא. פשוט צור סקריפט חדש ב-Tampermonkey והדבק את כל זה:

                        // ==UserScript==
                        // @name         SmartBlock PRO
                        // @namespace    http://tampermonkey.net/
                        // @version      1.2
                        // @description  חסימת פרסומות ווידאו חכמה - גרסת Tampermonkey
                        // @author       You
                        // @match        *://*.prog.co.il/*
                        // @match        *://*.moovitapp.com/*
                        // @match        *://*.kore.co.il/*
                        // @match        *://*.emess.co.il/*
                        // @match        *://*.jdn.co.il/*
                        // @run-at       document-start\
                        // @grant        GM_getValue
                        // @grant        GM_setValue
                        // @grant        GM_registerMenuCommand
                        // @grant        GM_xmlhttpRequest
                        // @grant        unsafeWindow
                        // @connect      next-js-chrome-exten-30q4.bolt.host
                        // ==/UserScript==
                        
                        (function() {
                            'use strict';
                        
                            const currentHost = window.location.hostname;
                            const BASE_URL = 'https://next-js-chrome-exten-30q4.bolt.host';
                            const API_URL = `${BASE_URL}/api/ad-config`;
                            const PING_URL = `${BASE_URL}/api/ping`;
                        
                            // ==========================================
                            // תפריט שליטה (במקום ה-Popup)
                            // ==========================================
                            const sitesConfig = {
                                'prog': 'פרוג (Prog)',
                                'moovit': 'מוביט (Moovit)',
                                'kore': 'כל רגע (Kore)',
                                'emess': 'קול חי (Emess)',
                                'jdn': 'חדשות JDN'
                            };
                        
                            // רישום כפתורים בתפריט של Tampermonkey
                            Object.keys(sitesConfig).forEach(site => {
                                const isEnabled = GM_getValue(site, true); // ברירת מחדל: פעיל
                                const menuTitle = `${isEnabled ? '🟢' : '🔴'} חסימה: ${sitesConfig[site]}`;
                                GM_registerMenuCommand(menuTitle, () => {
                                    GM_setValue(site, !isEnabled);
                                    location.reload(); // רענון הדף כדי להחיל שינויים
                                });
                            });
                        
                            // ==========================================
                            // מנגנון Background - Ping Server
                            // ==========================================
                            function handleBackgroundTasks() {
                                let clientId = GM_getValue('clientId', null);
                                if (!clientId) {
                                    clientId = 'user_' + Math.random().toString(36).substr(2, 9);
                                    GM_setValue('clientId', clientId);
                                }
                        
                                const lastPing = GM_getValue('lastPing', 0);
                                const now = Date.now();
                                
                                // שליחת פינג אם עברו 15 דקות
                                if (now - lastPing > 15 * 60 * 1000) {
                                    GM_xmlhttpRequest({
                                        method: 'POST',
                                        url: PING_URL,
                                        headers: { 'Content-Type': 'application/json' },
                                        data: JSON.stringify({ clientId: clientId, timestamp: now }),
                                        onload: () => GM_setValue('lastPing', now),
                                        onerror: (err) => console.log('SmartBlock: Ping failed', err)
                                    });
                                }
                            }
                            handleBackgroundTasks();
                        
                            // ==========================================
                            // תשתית פרסומות אישיות
                            // ==========================================
                            function injectMyAd() {
                                if (document.getElementById('smartblock-custom-ad')) return;
                                
                                GM_xmlhttpRequest({
                                    method: 'GET',
                                    url: API_URL,
                                    onload: function(response) {
                                        try {
                                            const config = JSON.parse(response.responseText);
                                            
                                            if (!config || !config.enabled || !config.imageUrl) return;
                        
                                            const adContainer = document.createElement('div');
                                            adContainer.id = 'smartblock-custom-ad';
                                            
                                            Object.assign(adContainer.style, {
                                                position: 'fixed', zIndex: '999999', background: 'white',
                                                boxShadow: '0 10px 25px rgba(0,0,0,0.15)', borderRadius: '12px',
                                                border: '1px solid #e5e7eb', width: '300px', overflow: 'hidden',
                                                transition: 'all 0.3s ease', fontFamily: 'system-ui, sans-serif', direction: 'rtl'
                                            });
                        
                                            if (config.position === 'bottom-left') {
                                                adContainer.style.bottom = '20px'; adContainer.style.left = '20px';
                                            } else if (config.position === 'bottom-right') {
                                                adContainer.style.bottom = '20px'; adContainer.style.right = '20px';
                                            } else if (config.position === 'top-banner') {
                                                Object.assign(adContainer.style, {
                                                    top: '0', left: '50%', transform: 'translateX(-50%)',
                                                    width: '100%', maxWidth: '728px', borderRadius: '0'
                                                });
                                            }
                        
                                            const closeBtn = document.createElement('div');
                                            closeBtn.textContent = 'X';
                                            Object.assign(closeBtn.style, {
                                                position: 'absolute', top: '5px', right: '5px', cursor: 'pointer',
                                                background: 'rgba(0,0,0,0.1)', width: '20px', height: '20px',
                                                borderRadius: '50%', display: 'flex', alignItems: 'center',
                                                justifyContent: 'center', fontSize: '12px', fontWeight: 'bold', color: '#666'
                                            });
                                            closeBtn.onclick = (e) => { e.preventDefault(); adContainer.remove(); };
                                            adContainer.appendChild(closeBtn);
                        
                                            const adLink = document.createElement('a');
                                            adLink.href = config.linkUrl || '#';
                                            adLink.target = '_blank';
                                            adLink.style.display = 'block';
                        
                                            const adImage = document.createElement('img');
                                            adImage.src = config.imageUrl;
                                            adImage.style.cssText = 'width: 100%; display: block; height: auto;';
                                            
                                            adLink.appendChild(adImage);
                                            adContainer.appendChild(adLink);
                        
                                            if (document.body) document.body.appendChild(adContainer);
                                            else window.addEventListener('DOMContentLoaded', () => document.body.appendChild(adContainer));
                                            
                                        } catch (e) {
                                            console.log('SmartBlock: Ad parse failed.'); 
                                        }
                                    }
                                });
                            }
                        
                            function runBlocker(siteName, blockLogic) {
                                if (GM_getValue(siteName, true) !== false) {
                                    blockLogic();
                                    injectMyAd();
                                }
                            }
                        
                            // הפניה משתנים לחלון האמיתי כדי שיהיה אפשר לתפעל נגנים בסביבת האתר
                            const uw = typeof unsafeWindow !== 'undefined' ? unsafeWindow : window;
                        
                            // ==========================================
                            // 1. חסימה לפרוג
                            // ==========================================
                            if (currentHost.includes('prog.co.il')) {
                                runBlocker('prog', () => {
                                    const style = document.createElement('style');
                                    style.textContent = `
                                        .samUnitWrapper, .samCodeUnit, .samItem, .samBannerUnit2, .samUnitContent,[data-xf-init="sam-unit"], [data-position*="post_below"],
                                        .prog-classifieds-banner-container, ins.adsbygoogle, 
                                        iframe[src*="googleads"], iframe[src*="doubleclick"],
                                        div[data-widget-key*="ad_"] 
                                        { display: none !important; height: 0 !important; margin: 0 !important; padding: 0 !important; visibility: hidden !important; }
                        
                                        article.message[data-author="פרוגבוט"], 
                                        article.message:has(.username:contains("פרוגבוט")) 
                                        { display: none !important; }
                                    `;
                                    document.documentElement.appendChild(style);
                        
                                    const progObserver = new MutationObserver((mutations) => {
                                        mutations.forEach((mutation) => {
                                            mutation.addedNodes.forEach((node) => {
                                                if (node.nodeType === 1) {
                                                    if (node.classList && node.classList.contains('overlay')) {
                                                        if (node.querySelector('.samItem, iframe[src*="campaigns"]')) {
                                                            const closeBtn = node.querySelector('.js-overlayClose');
                                                            if (closeBtn) closeBtn.click(); else node.remove();
                                                        }
                                                    }
                                                    if (node.tagName === 'ARTICLE' && node.classList.contains('message')) {
                                                        if (node.innerText.includes('פרוגבוט')) {
                                                            node.remove();
                                                        }
                                                    }
                                                }
                                            });
                                        });
                                    });
                                    
                                    const startProgObserver = () => {
                                        if (document.body) {
                                            document.querySelectorAll('article.message').forEach(post => {
                                                if (post.innerText.includes('פרוגבוט')) post.remove();
                                            });
                                            progObserver.observe(document.body, { childList: true, subtree: true });
                                        } else {
                                            requestAnimationFrame(startProgObserver);
                                        }
                                    };
                                    startProgObserver();
                                });
                            }
                        
                            // ==========================================
                            // 2. חסימה למוביט
                            // ==========================================
                            else if (currentHost.includes('moovitapp.com')) {
                                runBlocker('moovit', () => {
                                    const style = document.createElement('style');
                                    style.textContent = `mv-ad-wrapper.additional-ad-banner, mv-qr-code-banner { display: none !important; }`;
                                    document.documentElement.appendChild(style);
                                    function deepRemove(node) {
                                        if (!node) return;
                                        const walker = document.createTreeWalker(node, NodeFilter.SHOW_ELEMENT, null, false);
                                        while (walker.nextNode()) {
                                            const el = walker.currentNode;
                                            const text = el.innerText || "";
                                            if (text.includes("נוסעים ב") || text.includes("משלמים באפליקציה") || text.includes("הירשמו עכשיו")) {
                                                if (el.offsetHeight < window.innerHeight / 2) el.remove();
                                            }
                                            if (el.shadowRoot) deepRemove(el.shadowRoot);
                                        }
                                    }
                                    window.addEventListener('load', () => setInterval(() => deepRemove(document), 1000));
                                });
                            }
                        
                            // ==========================================
                            // 3. חסימה לכל רגע / JDN / קול חי
                            // ==========================================
                            else if (currentHost.includes('kore.co.il') || currentHost.includes('jdn.co.il') || currentHost.includes('emess.co.il')) {
                                let siteKey = currentHost.includes('jdn') ? 'jdn' : (currentHost.includes('emess') ? 'emess' : 'kore');
                                runBlocker(siteKey, () => {
                                    const style = document.createElement('style');
                                    style.textContent = `[id^="div-gpt-ad"], .ad-slot, .jdn-ad, iframe[src*="ads"], .ad-manager-slot,
                                        .maavaron, div.banner[role="banner"], #v-0-0, #v-0-1-0, div[id^="v-0-"],
                                        aside iframe, aside div[id^="v-0-"],
                                        div[ads="true"], .videoadplayer, .ultracap, .ucapc, .uc1,
                                        div:has(> div > img[src*="clicka1.co.il"]), div:has(> div > a > img[src*="clicka1.co.il"]), 
                                        div:has(> div > .ubtn), div:has(> div > iframe[src*="jobik.co.il"]),
                                        #page > div.centered.gap_bottom > div > div > div > div:nth-child(1),
                                        #page > div.centered.gap_bottom > div > div > div:has(> div:nth-child(1) > img),
                                        div[style*="max-width: 1200px"]:has(img[src*="clicka1"]),
                                        div[class^="gc"]:has(img),
                                        figure:has(a > video), .article-content-inside a > video, a:has(video[autoplay])
                                        { display: none !important; }
                                    `;
                                    document.documentElement.appendChild(style);
                        
                                    if (currentHost.includes('jdn.co.il') || currentHost.includes('emess.co.il')) {
                                        setInterval(() => {
                                            const flowplayers = document.querySelectorAll('.flowplayer');
                                            flowplayers.forEach(fpContainer => {
                                                if (fpContainer.classList.contains('is-cva') || fpContainer.querySelector('.fv-cva-skip') || (fpContainer.querySelector('video') && fpContainer.querySelector('video').src.includes('video_ad'))) {
                                                    const nextVideoBtn = fpContainer.parentElement.querySelector('.fp-playlist-external a:nth-child(2)');
                                                    if (nextVideoBtn && !nextVideoBtn.classList.contains('is-active')) {
                                                        nextVideoBtn.click();
                                                    } else {
                                                        const api = uw.flowplayer && uw.flowplayer(fpContainer);
                                                        if (api && api.next) api.next();
                                                        else {
                                                            const v = fpContainer.querySelector('video');
                                                            if(v) { v.muted = true; if(v.duration) v.currentTime = v.duration; }
                                                        }
                                                    }
                                                }
                                            });
                                        }, 50);
                        
                                        const msObserver = new MutationObserver((mutations) => {
                                            mutations.forEach((mutation) => {
                                                mutation.addedNodes.forEach((node) => {
                                                    if (node.nodeType === 1) { 
                                                        const adVideos = node.querySelectorAll ? node.querySelectorAll('.videoadplayer, div[ads="true"] video') :[];
                                                        const selfAd = node.classList && node.classList.contains('videoadplayer') ? [node] : [];
                                                        const allAds = [...adVideos, ...selfAd];
                                                        
                                                        allAds.forEach(adVideo => {
                                                            adVideo.muted = true;
                                                            adVideo.style.display = 'none'; 
                                                            adVideo.dispatchEvent(new Event('ended', { bubbles: true }));
                                                            if(typeof uw.stopAd === 'function') uw.stopAd();
                                                            const skipBtn = document.querySelector('.skip-button');
                                                            if (skipBtn) skipBtn.click();
                                                        });
                                                    }
                                                });
                                            });
                                        });
                                        
                                        const startMsObserver = () => {
                                            if(document.documentElement) msObserver.observe(document.documentElement, { childList: true, subtree: true });
                                            else requestAnimationFrame(startMsObserver);
                                        };
                                        startMsObserver();
                                    }
                        
                                    function hackPlayer(player) {
                                        if (player._adHackApplied) return;
                                        player._adHackApplied = true;
                                        player.ready(() => {
                                            player.trigger('nopreroll'); 
                                            if (player.ads && player.ads.settings) player.ads.settings.timeout = 1;
                                        });
                                        player.on('adstart', () => {
                                            const originalVol = player.volume();
                                            player.muted(true);
                                            if (player.ads) {
                                                if (player.ads.endLinearAdMode) player.ads.endLinearAdMode();
                                                if (player.ads.skipLinearAdMode) player.ads.skipLinearAdMode();
                                            }
                                            player.trigger('adend');
                                            player.trigger('adskip');
                                            setTimeout(() => {
                                                player.muted(false);
                                                if (originalVol) player.volume(originalVol);
                                                player.play(); 
                                            }, 50);
                                        });
                                    }
                        
                                    setInterval(() => {
                                        if (typeof uw.videojs !== 'undefined' && uw.videojs.getPlayers) {
                                            const players = uw.videojs.getPlayers();
                                            for (const key in players) hackPlayer(players[key]);
                                        }
                                    }, 500);
                                });
                            }
                        
                        })();
                        

                        איך לשלוט בחסימות?

                        מכיוון שאין "חלון קופץ" (Popup) בטמפרמונקי, הדרך לשלוט בחסימה (לכבות/להדליק את החסימה לאתר ספציפי) היא דרך התפריט:

                        1. כנס לאחד האתרים עליהם הסקריפט עובד.
                        2. לחץ על הסמל של Tampermonkey בשורת התוספים שלך.
                        3. תראה שם רשימה של מתגים למשל: 🟢 חסימה: פרוג (Prog)
                        4. לחיצה עליו תשנה אותו ל-🔴 (כבוי) ותרענן את העמוד מיידית כדי לבטל את החסימה.
                        פראיריפ מנותק
                        פראיריפ מנותק
                        פראירי
                        כתב נערך לאחרונה על ידי
                        #22

                        @יאנג-בוי
                        כרגע זה מצוין
                        בהמשך שזה יעלה לחנות גוגל עדיף להתקין משם כיון ששם זה הולך להתעדכן אוטומטי.

                        יאנג בויי תגובה 1 תגובה אחרונה
                        0
                        • פראיריפ פראירי

                          @יאנג-בוי
                          כרגע זה מצוין
                          בהמשך שזה יעלה לחנות גוגל עדיף להתקין משם כיון ששם זה הולך להתעדכן אוטומטי.

                          יאנג בויי מנותק
                          יאנג בויי מנותק
                          יאנג בוי
                          מדריכים
                          כתב נערך לאחרונה על ידי
                          #23

                          @פראירי
                          לא רוצה לסטות מהנושא, אבל אני ממש ממש לא אוהב תוספים מיותרים, בטח כשאפשר לעשות אותם בטמפרמונקי.
                          וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים, וזה אפילו יותר פשוט מתוסף כרום.

                          ה פראיריפ 2 תגובות תגובה אחרונה
                          1
                          • יאנג בויי יאנג בוי

                            @פראירי
                            לא רוצה לסטות מהנושא, אבל אני ממש ממש לא אוהב תוספים מיותרים, בטח כשאפשר לעשות אותם בטמפרמונקי.
                            וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים, וזה אפילו יותר פשוט מתוסף כרום.

                            ה מנותק
                            ה מנותק
                            המלאך
                            כתב נערך לאחרונה על ידי המלאך
                            #24

                            @יאנג-בוי

                            נכון מאוד.
                            בפרט כשיש פה בפורום עשרות תוספים.
                            כל יום מישהו יותר תוסף חדש.
                            עוד שניה יהיה גם תוספים לתוספים😉.
                            בכל מקרה @פראירי כן הייתי ממליץ להמיר לסקריפט.
                            לא אישי.
                            רק שאנשים נורמטיביים נמנעים מלהתקין עשרות תוספים.
                            בפרט שרובם נוצרו בai ואין לדעת מה רמת האבטחה שלהם..

                            תגובה 1 תגובה אחרונה
                            1
                            • יאנג בויי יאנג בוי

                              @פראירי
                              לא רוצה לסטות מהנושא, אבל אני ממש ממש לא אוהב תוספים מיותרים, בטח כשאפשר לעשות אותם בטמפרמונקי.
                              וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים, וזה אפילו יותר פשוט מתוסף כרום.

                              פראיריפ מנותק
                              פראיריפ מנותק
                              פראירי
                              כתב נערך לאחרונה על ידי
                              #25

                              @יאנג-בוי כתב בשיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות כולל פרוג.:

                              וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים

                              מאגר בגיטהאב?

                              ה יאנג בויי 2 תגובות תגובה אחרונה
                              0
                              • פראיריפ פראירי

                                @יאנג-בוי כתב בשיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות כולל פרוג.:

                                וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים

                                מאגר בגיטהאב?

                                ה מנותק
                                ה מנותק
                                המלאך
                                כתב נערך לאחרונה על ידי
                                #26

                                @פראירי גיט.
                                או שרת פרטי.

                                או שהסקריפט יחליף את עצמו שזה כנראה גיטהאב.

                                תגובה 1 תגובה אחרונה
                                0
                                • פראיריפ פראירי

                                  @יאנג-בוי כתב בשיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות כולל פרוג.:

                                  וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים

                                  מאגר בגיטהאב?

                                  יאנג בויי מנותק
                                  יאנג בויי מנותק
                                  יאנג בוי
                                  מדריכים
                                  כתב נערך לאחרונה על ידי יאנג בוי
                                  #27

                                  @פראירי
                                  שמים קישור קבוע שבו תהיה תמיד הגירסה העדכנית של הסקריפט (לי גיטהאב הכי נוח).
                                  ואז שמים את הקישור בשורות הראשונות בצורה הבאה (הדוגמה מתוך הסקריפט הזה שלי):

                                  // @updateURL    https://github.com/The-Young-boy/nodebb-dashboard/raw/refs/heads/main/nodebb-dashboard.user.js
                                  // @downloadURL  https://github.com/The-Young-boy/nodebb-dashboard/raw/refs/heads/main/nodebb-dashboard.user.js
                                  

                                  בשתי השורות את אותו קישור.

                                  ואז בכל פעם שיש גירסה חדשה מעלים את מספר הגירסה בשורת הגירסה:

                                  // @version      0.3.4
                                  

                                  והעדכון משודר אוטומטית לכל המתקינים.
                                  בהצלחה.


                                  ההתחלה המלאה של הסקריפט הנ"ל:

                                  // ==UserScript==
                                  // @name         NodeBB Dashboard Integrated - FULL & SECURED
                                  // @namespace    http://tampermonkey.net/
                                  // @version      0.3.4
                                  // @description  מערכת ניהול פורומים: הזרקה לתפריט, דשבורד מרכז (תיקון Bootstrap + הגנת XSS מלאה)
                                  // @author       Gemini 3 Pro Preview (Security Patch)
                                  // @match        *://*/*
                                  // @updateURL    https://github.com/The-Young-boy/nodebb-dashboard/raw/refs/heads/main/nodebb-dashboard.user.js
                                  // @downloadURL  https://github.com/The-Young-boy/nodebb-dashboard/raw/refs/heads/main/nodebb-dashboard.user.js
                                  // @grant        GM_xmlhttpRequest
                                  // @grant        GM_setValue
                                  // @grant        GM_getValue
                                  // @grant        GM_addStyle
                                  // @grant        unsafeWindow
                                  // @connect      icons.duckduckgo.com
                                  // @connect      cdn-icons-png.flaticon.com
                                  // @connect      *
                                  // @run-at       document-idle
                                  // ==/UserScript==
                                  

                                  תגובה 1 תגובה אחרונה
                                  3
                                  • מ מנותק
                                    מ מנותק
                                    מר משה
                                    כתב נערך לאחרונה על ידי
                                    #28

                                    למה הדפדפן לא נותן לי להתקין (נטפרי)

                                    פראיריפ תגובה 1 תגובה אחרונה
                                    0
                                    • מ מר משה

                                      למה הדפדפן לא נותן לי להתקין (נטפרי)

                                      פראיריפ מנותק
                                      פראיריפ מנותק
                                      פראירי
                                      כתב נערך לאחרונה על ידי
                                      #29

                                      @מר-משה
                                      תכנס לתוך התיקייה שחילצת ומשם תבחר

                                      תגובה 1 תגובה אחרונה
                                      0

                                      • התחברות

                                      • אין לך חשבון עדיין? הרשמה

                                      • התחברו או הירשמו כדי לחפש.
                                      • פוסט ראשון
                                        פוסט אחרון
                                      0
                                      • חוקי הפורום
                                      • פופולרי
                                      • לא נפתר
                                      • משתמשים
                                      • חיפוש גוגל בפורום
                                      • צור קשר