Skip to content

Settings page (enable/disable/reorder/hide features), Dark Mode system theme, GDPR per-site exclusions, Cookie/Tab/JSON improvements#5

Open
mayerwin wants to merge 1 commit into
levelsio:mainfrom
mayerwin:feature/cookie-filter-tabcleaner-jsonformatter-search
Open

Settings page (enable/disable/reorder/hide features), Dark Mode system theme, GDPR per-site exclusions, Cookie/Tab/JSON improvements#5
mayerwin wants to merge 1 commit into
levelsio:mainfrom
mayerwin:feature/cookie-filter-tabcleaner-jsonformatter-search

Conversation

@mayerwin
Copy link
Copy Markdown

@mayerwin mayerwin commented Jun 8, 2026

⚙️ Settings Page — Customize Features (NEW)

The biggest change: a full Settings page to customize the extension.

  • Enable/Disable toggles for each of the 15 features — disabling removes the tab from nav and stops scripts from executing
  • Drag-and-drop reordering — custom tab order persisted to storage, reflected in the nav bar instantly
  • Hide features from the nav bar while keeping them active in the background
  • Bulk actions: Enable All, Disable All, Show Hidden
  • Live counter showing N of 15 features active
  • Tooltips on each feature row (suppressed during drag-and-drop)

The old hardcoded nav bar is replaced with a dynamic one generated from the FEATURES array. All per-feature toggle switches (darkToggle, nocookieToggle, etc.) have been removed from individual pages — toggling is centralized in Settings.


🌙 Dark Mode — 3-State Pill Selector (ON / OFF / SYSTEM)

Replace the binary toggle with a 3-state pill with animated glider:

  • ON: always dark
  • OFF: always light
  • SYSTEM: follows prefers-color-scheme, auto-switches when system theme changes

Each option has a tooltip. darkmode.js now tracks mode state and listens to matchMedia change events.


🚫 GDPR Consent — Per-Site Exclusions

Instead of toggling GDPR dismissal off globally when one site breaks:

  • Exclude This Site button adds the current domain to a per-site exclusion list
  • Manage excluded sites directly from the popup with remove buttons
  • nocookie.js: new checkAndActivate() checks both the global toggle and per-domain exclusion list

🍪 Cookie Editor — Filter, Delete Filtered, Clear Button

  • Filter input in the cookie header to search by name
  • × clear button inside the filter field (visible only when text is present)
  • Delete Filtered button replaces Delete All when a filter is active — removes only matching cookies
  • Filter resets automatically when switching domains

🚮 Tab Cleaner — Subdomain Toggle (Retrocompatible)

  • Each exclusion now shows a subdomains checkbox
  • ✅ Checked (default): matches domain + all subdomains
  • ☐ Unchecked: exact host match only (stored as exact:domain)
  • 100% backward compatible: existing plain-string exclusions keep wildcard behavior

{} JSON Formatter — Live Search with Auto-Expand

  • Search input (type=search with native × button) in the toolbar
  • Highlights matching keys/values with high-contrast mark tags
  • Auto-expands all collapsed parent blocks containing a match
  • Clearing input restores original content

Other Changes

  • viewimage.js: dual path fallback for Google Images metadata extraction (data[31] + data[56])
  • livecss.js: respects feature_livecss_enabled flag — disabling CSS Editor in Settings prevents CSS injection
  • darkmode.js: full rewrite of state evaluation for on/off/system modes + matchMedia listener
  • gmaps.js: indentation-only (wrapped in callback), no logic changes
  • README.md: updated all feature descriptions

@mayerwin mayerwin force-pushed the feature/cookie-filter-tabcleaner-jsonformatter-search branch from aeb2c94 to df79765 Compare June 8, 2026 11:02
… system theme, GDPR per-site exclusions, Cookie Editor filter + delete filtered, Tab Cleaner subdomain toggle, JSON Formatter search

## Settings Page — Customize Features (NEW)

Add a full Settings page (⚙️) to the popup with:
- Enable/Disable toggle for each of the 15 features — disabling a feature removes its tab from the nav bar and stops its scripts from executing
- Drag-and-drop reordering of features — custom tab order persisted to storage and reflected in the nav bar instantly
- Hide features from the nav bar while keeping them active in the background
- Bulk actions: Enable All, Disable All, Show Hidden
- Live counter showing 'N of 15 features active'
- Tooltips on each feature row showing its description (suppressed during drag-and-drop to avoid visual clutter)

The hardcoded nav bar is replaced with a dynamic one generated from the FEATURES array, respecting enable/disable state, hidden state, and custom order. All individual per-feature toggle switches (darkToggle, nocookieToggle, xdimToggle, unhookToggle, xunhookToggle, jsonformatToggle, etc.) have been removed from their respective pages — toggling is now centralized in Settings.

## Dark Mode — 3-State Pill Selector (ON / OFF / SYSTEM)

Replace the binary toggle with a 3-state pill selector with animated glider:
- ON: always force dark theme
- OFF: always force light theme
- SYSTEM: follow the OS prefers-color-scheme media query, auto-switching when the system theme changes
- Each pill button has a tooltip explaining its behavior
- darkmode.js now tracks currentMode and listens to matchMedia change events

## GDPR Consent — Per-Site Exclusions

- Add per-domain exclusion so users can exclude individual sites that break instead of disabling the feature globally
- 'Exclude This Site' button on the GDPR page adds the current domain to a nocookie_exclusions list
- Excluded sites list is manageable directly from the popup with remove buttons
- nocookie.js: new checkAndActivate() function checks both the global toggle and per-domain exclusion list before activating
- Listens for nocookie_exclusions_updated messages to react to changes in real time

## Cookie Editor — Filter + Delete Filtered + Clear Button

- Add filter input in the cookie header to search cookies by name
- Add × clear button inside the filter field, visible only when text is present
- When a filter is active, 'Delete All' is replaced by 'Delete Filtered' which removes only matching cookies
- Filter resets automatically when switching to a different domain

## Tab Cleaner — Subdomain Toggle (Retrocompatible)

- Each exclusion now shows a 'subdomains' checkbox
- Checked (default): matches domain + all subdomains (google.com matches mail.google.com)
- Unchecked: exact host match only — stored as 'exact:domain' in storage
- 100% backward compatible: existing plain-string exclusions keep their wildcard behavior unchanged

## JSON Formatter — Live Search with Auto-Expand

- Add search input (type=search with native × button) to the formatted JSON toolbar
- Highlights matching keys/values with high-contrast mark tags
- Automatically expands all collapsed parent blocks containing a match
- Clearing input restores all original content

## Other Changes

- viewimage.js: add second data path (data[31][0][12][2]) for Google Images metadata extraction alongside existing data[56] path; wrap in event listener callback (indentation-only for existing code)
- livecss.js: respect feature_livecss_enabled flag — disabling CSS Editor in Settings now prevents CSS injection
- darkmode.js: full rewrite of state evaluation to support on/off/system modes and matchMedia listener
- gmaps.js: wrapped in event listener callback (indentation-only, no logic changes)
- README.md: updated feature descriptions to reflect all changes above
@mayerwin mayerwin force-pushed the feature/cookie-filter-tabcleaner-jsonformatter-search branch from df79765 to d5b80e3 Compare June 8, 2026 11:06
@mayerwin mayerwin changed the title feat: cookie filter clear btn, delete filtered, tab cleaner subdomains, JSON search feat: Settings page (enable/disable/reorder/hide features), Dark Mode system theme, GDPR per-site exclusions, Cookie/Tab/JSON improvements Jun 8, 2026
@mayerwin mayerwin changed the title feat: Settings page (enable/disable/reorder/hide features), Dark Mode system theme, GDPR per-site exclusions, Cookie/Tab/JSON improvements Settings page (enable/disable/reorder/hide features), Dark Mode system theme, GDPR per-site exclusions, Cookie/Tab/JSON improvements Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant