שיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות כולל פרוג.
-
@פראירי תודה!
מדהים שביום כזה יש לך זמן להנפיק כאלו דברים...אולי כדאי שתכניס את זה גם כאן (בתחילת הפוסט)
כתב בשיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות ובפרוג:
להורדה
ואגב, לא הבנתי איך אתה רואה את מספר ההתקנות! התוסף שולח אליך מידע?

@בנימין-מחשבים כן.
לא עברתי, אבל כך נשמע.
וזה לא כזה מסובך. -
@בנימין-מחשבים כן.
לא עברתי, אבל כך נשמע.
וזה לא כזה מסובך. -
https://mitmachim.top/assets/uploads/files/1775034425464-תוסף.zip
להורדה
️
(כמו שהבין @efishesh פשוט היה ערבוב של תוים בגלל הטקסט קישור) -
@פראירי הקישור שלך לא תקין
מבנה של קישור שבלחיצה יורד (ולא רק בפתיחה בדף חדש) הוא ככה
[תוסף.zip] (/assets/uploads/files/1775034425464-תוסף.zip)
רק בלי הרווח בין הסוגריים העגולות למרובעות -
אשמח לארח אצלי אם לא הסתדרת עם חשבון גוגל. ואגב אני מציע להעלות את זה לגיטהאב ככה אנשים יוכלו לתרום, כי חוסם פרסומות זה דבר דינמי שדורש עדכונים ותחזוקה באופן רציף.
-
אשמח לארח אצלי אם לא הסתדרת עם חשבון גוגל. ואגב אני מציע להעלות את זה לגיטהאב ככה אנשים יוכלו לתרום, כי חוסם פרסומות זה דבר דינמי שדורש עדכונים ותחזוקה באופן רציף.
-
-
@סוף-הרחוב
לא רק בניוזיק.
וזה נמצא בגרסה 1.3 -
@סוף-הרחוב
לא רק בניוזיק.
וזה נמצא בגרסה 1.3 -
@פראירי כתב בשיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות ובפרוג:
וזה נמצא בגרסה 1.3
שו?
-
בקשתי מג'מיני להמיר את הגרסה הראשונה (שהורדתי בערב חג) לטמפרמונקי.
בדקתי באמס ועובד מעולה, בשאר לא בדקתי.
אם יש ביקוש אעדכן את זה גם בהמשך (כרגע עשיתי לעצמי... לא יודע אם עוד מישהו פה הולך להשתמש בזה...)רשות הדיבור לג'מיני:
מכיוון ש-Tampermonkey עובד קצת אחרת מתוסף כרום מלא (אין לו חלון קופץ Popup נפרד או קובץ Background שרץ ברקע כל הזמן), ביצעתי את ההתאמות הבאות:
- החלון הקופץ (Popup): הומר לתפריט הפעולות המובנה של Tampermonkey (יופיעו לך כפתורי הדלקה/כיבוי בלחיצה על הסמל של Tampermonkey).
- אחסון (Storage): במקום
chrome.storage.localהשתמשתי בפונקציות האחסון של סקריפטיםGM_getValueו-GM_setValue. - תהליכי רקע (Background): מנגנון ה-Ping של ה-15 דקות הומר לבדיקה שמתבצעת בכל טעינת עמוד רלוונטי, ששולחת Ping רק אם חלפו 15 דקות מהפעם הקודמת.
- תקשורת (Fetch): הומר ל-
GM_xmlhttpRequestכדי לעקוף בעיות CORS שעלולות לצוץ ללא ההרשאות המיוחדות של התוסף. - גישה למשתני חלון: נוסף שימוש ב-
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) בטמפרמונקי, הדרך לשלוט בחסימה (לכבות/להדליק את החסימה לאתר ספציפי) היא דרך התפריט:
- כנס לאחד האתרים עליהם הסקריפט עובד.
- לחץ על הסמל של Tampermonkey בשורת התוספים שלך.
- תראה שם רשימה של מתגים למשל:
🟢 חסימה: פרוג (Prog) - לחיצה עליו תשנה אותו ל-
🔴(כבוי) ותרענן את העמוד מיידית כדי לבטל את החסימה.
-
בקשתי מג'מיני להמיר את הגרסה הראשונה (שהורדתי בערב חג) לטמפרמונקי.
בדקתי באמס ועובד מעולה, בשאר לא בדקתי.
אם יש ביקוש אעדכן את זה גם בהמשך (כרגע עשיתי לעצמי... לא יודע אם עוד מישהו פה הולך להשתמש בזה...)רשות הדיבור לג'מיני:
מכיוון ש-Tampermonkey עובד קצת אחרת מתוסף כרום מלא (אין לו חלון קופץ Popup נפרד או קובץ Background שרץ ברקע כל הזמן), ביצעתי את ההתאמות הבאות:
- החלון הקופץ (Popup): הומר לתפריט הפעולות המובנה של Tampermonkey (יופיעו לך כפתורי הדלקה/כיבוי בלחיצה על הסמל של Tampermonkey).
- אחסון (Storage): במקום
chrome.storage.localהשתמשתי בפונקציות האחסון של סקריפטיםGM_getValueו-GM_setValue. - תהליכי רקע (Background): מנגנון ה-Ping של ה-15 דקות הומר לבדיקה שמתבצעת בכל טעינת עמוד רלוונטי, ששולחת Ping רק אם חלפו 15 דקות מהפעם הקודמת.
- תקשורת (Fetch): הומר ל-
GM_xmlhttpRequestכדי לעקוף בעיות CORS שעלולות לצוץ ללא ההרשאות המיוחדות של התוסף. - גישה למשתני חלון: נוסף שימוש ב-
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) בטמפרמונקי, הדרך לשלוט בחסימה (לכבות/להדליק את החסימה לאתר ספציפי) היא דרך התפריט:
- כנס לאחד האתרים עליהם הסקריפט עובד.
- לחץ על הסמל של Tampermonkey בשורת התוספים שלך.
- תראה שם רשימה של מתגים למשל:
🟢 חסימה: פרוג (Prog) - לחיצה עליו תשנה אותו ל-
🔴(כבוי) ותרענן את העמוד מיידית כדי לבטל את החסימה.
-
@יאנג-בוי
כרגע זה מצוין
בהמשך שזה יעלה לחנות גוגל עדיף להתקין משם כיון ששם זה הולך להתעדכן אוטומטי. -
@פראירי
לא רוצה לסטות מהנושא, אבל אני ממש ממש לא אוהב תוספים מיותרים, בטח כשאפשר לעשות אותם בטמפרמונקי.
וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים, וזה אפילו יותר פשוט מתוסף כרום. -
@פראירי
לא רוצה לסטות מהנושא, אבל אני ממש ממש לא אוהב תוספים מיותרים, בטח כשאפשר לעשות אותם בטמפרמונקי.
וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים, וזה אפילו יותר פשוט מתוסף כרום. -
@יאנג-בוי כתב בשיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות כולל פרוג.:
וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים
מאגר בגיטהאב?
-
@יאנג-בוי כתב בשיתוף | SmartBlock PRO| תוסף לחסימת פרסומות מוחלטת באתרי חדשות כולל פרוג.:
וגם לטמפרמונקי אפשר לעשות עדכונים אוטומטיים
מאגר בגיטהאב?
@פראירי
שמים קישור קבוע שבו תהיה תמיד הגירסה העדכנית של הסקריפט (לי גיטהאב הכי נוח).
ואז שמים את הקישור בשורות הראשונות בצורה הבאה (הדוגמה מתוך הסקריפט הזה שלי):// @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==
.