This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Universal Cookie Preference Sync Across Tabs

Utilities · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — try it free, no account needed.
CategoryUtilities
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This script detects cookie consent banners and preference popups on the page—GDPR, CCPA, and other cookie notices—then intercepts and synchronizes user cookie preferences across multiple tabs. It stores preference selections in GM_setValue and broadcasts changes via the Storage API, allowing all tabs to stay in sync. A floating panel shows the current domain's cookie preference status (Accepted, Rejected, Customized, or Pending) and allows users to set or override preferences. When you make a selection on one tab, the script automatically applies the same preference to other open tabs of the same domain, closing or dismissing consent banners across all tabs. A log of preference sync events is maintained, and users can reset preferences at any time.

WHERE IT RUNS

Works on any webpage with cookie consent banners—news sites, e-commerce, blogs, or any site displaying GDPR or CCPA notices. The script detects banners using common selectors and text patterns, making it compatible with most cookie notice implementations.

HOW TO USE

The panel appears automatically when you visit a page. It shows the current status of your cookie preference for the domain and detects any visible banners. Use the "Accept," "Reject," or "Customize" buttons to set your preference—this is stored and synced across all tabs. Enable "Auto-sync across tabs" to automatically apply preferences when they change in other tabs. Click "Sync Now" to manually apply the stored preference to any visible banners. Use "Reset Preference" to clear the stored preference for the domain. The script intercepts clicks on cookie banner buttons, so when you click "Accept" on a banner, the preference is captured and synced automatically. The panel updates in real-time as preferences change.

TECHNICAL MECHANISM: BANNER DETECTION WITH BUTTON INTERCEPTION AND CROSS-TAB BROADCASTING

The script detects cookie banners using a two-pass strategy. First, it scans for elements matching common cookie banner selectors (.cookie-banner, .cookie-consent, .gdpr-banner, #cookie-notice, etc.) and checks visibility via getBoundingClientRect. Second, it scans all divs, sections, and dialogs for text patterns like "cookie," "accept," "agree," "consent," or "privacy" to catch custom implementations. For each banner, it finds clickable buttons and identifies their action (accept, reject, customize) based on text content. The script intercepts button click events by replacing the click method with a wrapper that stores the preference, dismisses all banners, and broadcasts the change. Cross-tab communication uses a broadcast mechanism: when a preference is set, the script writes a sync event to GM_setValue with a unique ID, domain, status, and timestamp. All tabs check for new sync events every 2 seconds using a setInterval loop, and apply the preference if the event's domain matches the current tab. The script also applies stored preferences on page load, ensuring consistent behavior across all tabs. Banners are dismissed by clicking close buttons or by hiding them with style modifications (display: none, visibility: hidden, opacity: 0).

THE PANEL

The cookie preference sync panel appears in a draggable, resizable panel that remembers its position per site. The panel shows the current status, banner detection count, action buttons, and sync controls. Drag by the header to reposition, collapse to a compact icon with a click, and resize using the bottom-right corner. The panel snaps to screen edges for tidy placement and closes with the Escape key. All settings—auto-sync toggle and panel position—persist per website using GM_setValue, so your view returns exactly as you left it.

PLEASE NOTE

This script requires the free BotGentz extension to run. The banner detection uses heuristics and may not work perfectly on all sites—some custom implementations may be missed. The script intercepts click events on banner buttons, which may interfere with the site's own click handlers. The cross-tab sync uses GM_setValue polling with a 2-second interval, which may cause a slight delay in synchronization. The script does not read or modify actual cookies—it only controls the consent banner UI. All preference data is stored locally in your browser via GM_setValue and never transmitted. The reset preference action clears the stored preference but does not undo any cookies already set by the site.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.