| Eclipse Community https://board.eclipse.cx/ |
|
| User Scripts https://board.eclipse.cx/viewtopic.php?t=986 |
Page 1 of 1 |
| Author: | The-10-Pen [ 19 Jul 2026, 10:24 ] |
| Post subject: | User Scripts |
| Today's Outrage -- cookie banner notifications. What a nuisance! One of the most annoying "mandates" to ever come out of the EU. Adopted in 2002, amended in 2009, enacted in 2011/2012. Enough already! It's 14/15 **YEARS** later and we are still being PUNCHED IN THE FACE by these D@MN *nuisances*! uBO's filters lists DO NOT block ALL of them !!! I Still Don't Care About Cookies extension does NOT block ALL of them !!! Everything I have tried in the past 14/15 years seems to do okay for the most part, but you still encounter these PIECES OF SH#T. Enough already! So it's time for a more generic approach and one FULLY controlled and editable by me, no more waiting for uBO filter lists not catching these to be updated but never updated to catch them ALL, no more waiting for extensions to be updated but never updated to catch them ALL. Working so far! // ==UserScript== // @name - Auto Hide Cookie Banners // @version 1.0.1 // @match *://*/* // @grant none // @run-at document-idle // ==/UserScript== (function () { 'use strict'; // Common CSS selectors for cookie banners and consent popups const selectors = [ '[id*="cookie"]', '[class*="cookie"]', '[id*="consent"]', '[class*="consent"]', '[aria-label*="cookie"]', '[aria-label*="consent"]', 'div[role="dialog"]' ]; // Try to click reject/decline buttons if found const rejectButtonTexts = [ 'reject', 'decline', 'no thanks', 'opt out', 'refuse' ]; function removeCookieBanners() { selectors.forEach(sel => { document.querySelectorAll(sel).forEach(el => { // Try to find and click reject buttons inside the banner const btn = Array.from(el.querySelectorAll('button, a')) .find(b => rejectButtonTexts.some(txt => b.textContent.trim().toLowerCase().includes(txt) )); if (btn) { btn.click(); console.log('[CookieBlocker] Clicked reject button:', btn.textContent.trim()); } // Remove the banner from DOM el.remove(); console.log('[CookieBlocker] Removed element:', sel); }); }); } // Run immediately and also observe for dynamically loaded banners removeCookieBanners(); const observer = new MutationObserver(removeCookieBanners); observer.observe(document.body, { childList: true, subtree: true }); })(); |
| Author: | Duke [ 19 Jul 2026, 23:46 ] |
| Post subject: | User Scripts |
In Firefox and forks (R3dfox, LibreWolf, etc) you can set: Automatically refuse cookie banners disabled: cookiebanners.service.mode = 0 cookiebanners.service.mode.privateBrowsing = 0 Automatically refuse cookie banners set to reject all: cookiebanners.service.mode = 1 cookiebanners.service.mode.privateBrowsing = 1 A value of 2 means reject all or fallback to accept all. This is stupid, don't use 2. |
| Author: | The-10-Pen [ 20 Jul 2026, 00:29 ] |
| Post subject: | User Scripts |
| Agreed. But as you already know, that is not enough for me to revert to Firefox and forks. I *do* still hope that day will arrive, but it's simply not here yet. |
| Author: | The-10-Pen [ 20 Jul 2026, 14:44 ] |
| Post subject: | User Scripts |
| Okay @Duke, how 'bout this one? Pluto TV is a free streaming site that often times has an issue with the audio and video falling out of sync. Here: https://pluto.tv/us/live-tv ie, the lip movement no longer matches the timing of the speech. One fix is to wait for a commercial break, switch to a different channel, then switch back so that everything is back in sync. My long-term fix has become the below userscript. It synchronizes the audio and video every two seconds and accounts for any dropped frames. ie, by adjusting video playback speed so slightly that "humans" can't even detect the difference. Basically think of "negative feedback" systems where the system "tunes itself" by speeding up or slowing down. // ==UserScript== // @name - Add Pluto TV Advanced A/V Sync Fix // @version 2.0.1 // @match *://pluto.tv/* // @grant none // ==/UserScript== (function () { 'use strict'; // Configurable settings const CHECK_INTERVAL_MS = 2000; // How often to check sync const MAX_ALLOWED_DRIFT = 0.3; // Seconds before correction const RATE_ADJUST_STEP = 0.02; // Small rate change for smooth correction const MAX_RATE = 1.05; // Max playback rate allowed const MIN_RATE = 0.95; // Min playback rate allowed function findVideoElement() { return document.querySelector('video'); } function syncCheck() { const video = findVideoElement(); if (!video || video.readyState < 2 || video.paused) return; try { // Drift detection const now = performance.now(); if (!video._lastCheck) { video._lastCheck = now; video._lastTime = video.currentTime; video._lastDropped = 0; return; } const elapsedReal = (now - video._lastCheck) / 1000; // seconds const elapsedVideo = video.currentTime - video._lastTime; const drift = elapsedVideo - elapsedReal; // Dropped frame detection (if supported) let droppedFrames = 0; if (typeof video.getVideoPlaybackQuality === 'function') { const quality = video.getVideoPlaybackQuality(); droppedFrames = quality.droppedVideoFrames || 0; } const droppedSinceLast = droppedFrames - (video._lastDropped || 0); // Log for debugging console.log(`[PlutoTV Sync] Drift: ${drift.toFixed(3)}s, Dropped: ${droppedSinceLast}`); // Correction logic if (Math.abs(drift) > MAX_ALLOWED_DRIFT) { // Large drift — jump to correct console.warn(`[PlutoTV Sync] Large drift detected (${drift.toFixed(3)}s) — seeking`); video.currentTime -= drift; // Jump back/forward video.playbackRate = 1; } else if (Math.abs(drift) > 0.05 || droppedSinceLast > 5) { // Small drift or frame loss — adjust rate if (drift > 0) { // Video ahead of real time — slow down video.playbackRate = Math.max(MIN_RATE, video.playbackRate - RATE_ADJUST_STEP); } else { // Video behind — speed up video.playbackRate = Math.min(MAX_RATE, video.playbackRate + RATE_ADJUST_STEP); } } else { // In sync — reset rate if (video.playbackRate !== 1) { video.playbackRate = 1; } } // Save state for next check video._lastCheck = now; video._lastTime = video.currentTime; video._lastDropped = droppedFrames; } catch (err) { console.error('[PlutoTV Sync] Error:', err); } } // Wait for video to appear, then start checking const observer = new MutationObserver(() => { if (findVideoElement()) { console.log('[PlutoTV Sync] Video element found — starting advanced sync checks'); clearInterval(window._plutoSyncInterval); window._plutoSyncInterval = setInterval(syncCheck, CHECK_INTERVAL_MS); observer.disconnect(); } }); observer.observe(document.body, { childList: true, subtree: true }); })(); |
| Author: | Duke [ 20 Jul 2026, 18:33 ] |
| Post subject: | User Scripts |
I'm not using Pluto TV a lot but when I do I'm not experiencing audio/video sync issues. |
| Author: | xperceniol_sal [ 20 Jul 2026, 22:01 ] |
| Post subject: | User Scripts |
| I'm on Pluto TV now without any issues at all with Lun3r and Hydra! |
| Author: | The-10-Pen [ 20 Jul 2026, 22:50 ] |
| Post subject: | User Scripts |
| The sync issues only occur if you do not change the channel for SIX HOURS. Keep it on the same exact channel and watch non-stop for SIX HOURS. Some channels will unsync if watched non-stop long enough. I can't say that they "all" do. |
| Author: | The-10-Pen [ 20 Jul 2026, 23:04 ] |
| Post subject: | User Scripts |
| Although, granted, is it unsyncing for me at SIX HOURS ? Or is it unyncing for me because I have THREE PLUS streams all going simultaneously ? Regardless, my userscripts KEEPS EVERYTHING IN SYNC |
| Author: | Duke [ 21 Jul 2026, 01:44 ] |
| Post subject: | User Scripts |
I guess so |
| Author: | The-10-Pen [ 21 Jul 2026, 07:04 ] |
| Post subject: | User Scripts |
| Upon further compare/contrast, the unsync issue is only occurring on ONE of my many computers. And it occurs in both Chrome-based *AND* in Mozilla-based. This is also one of my last two computers still on Win10 *2016* despite 2019 or 21H2 being used on all other computers with *VAST IMPROVEMENTS*. This one is set to be upgraded soon. It's a Dell Latitude E5470 laptop with an Intel i5-6300U @ 2.4GHz with 8GB RAM. Don't recall graphics card offhand. |
| Author: | The-10-Pen [ 21 Jul 2026, 07:17 ] |
| Post subject: | User Scripts |
This one has become a GODSEND for a totally different reason. I am now using it to block all of the d@mn "AI" popups/banners/mogals/modules/chatbots that keep showing up at every turn on the internet. |
| Author: | The-10-Pen [ 21 Jul 2026, 10:16 ] |
| Post subject: | User Scripts |
Additional finding. It only unsyncs when MUTED for 1/2hr to an hour at a time and then only after five or six of those long-duration mutings. Each muting seems to unsync a tiny teany bit and they add up over time. |
| Author: | The-10-Pen [ 21 Jul 2026, 12:02 ] |
| Post subject: | User Scripts |
| This seems to do the trick. Always resync whenever any video is unmuted. Resync is forced by causing a slight pause/resume. // ==UserScript== // @name - Add Sync Video on Unmute // @version 1.0.1 // @match *://*/* // @grant none // ==/UserScript== (function () { 'use strict'; /** * Resyncs a video by briefly pausing and resuming it. * This can help fix A/V desync issues after unmuting. */ function resyncVideo(video) { try { if (!video.paused) { const currentTime = video.currentTime; video.pause(); // Small delay to allow browser to flush buffers setTimeout(() => { video.currentTime = currentTime; // Ensure position stays the same video.play().catch(err => { console.warn('Video play failed after resync:', err); }); }, 100); } } catch (err) { console.error('Error during video resync:', err); } } /** * Observe all videos on the page and attach unmute listeners. */ function attachListeners(video) { if (video.dataset.syncListenerAttached) return; // Avoid duplicates video.dataset.syncListenerAttached = 'true'; video.addEventListener('volumechange', () => { if (!video.muted && video.volume > 0) { console.log('Video unmuted — resyncing...'); resyncVideo(video); } }); } /** * Scan for videos periodically (for dynamically loaded content). */ function scanForVideos() { document.querySelectorAll('video').forEach(attachListeners); } // Initial scan scanForVideos(); // Observe DOM changes for dynamically added videos const observer = new MutationObserver(scanForVideos); observer.observe(document.body, { childList: true, subtree: true }); })(); |
| Author: | Duke [ 21 Jul 2026, 14:00 ] |
| Post subject: | User Scripts |
Good to know, I'll check that...someday |
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Limited | |