Skip to content

feature/fix: css scriptlet, fix js scriptlet#35

Merged
joshrmcdaniel merged 4 commits into
developfrom
feature/css
May 30, 2026
Merged

feature/fix: css scriptlet, fix js scriptlet#35
joshrmcdaniel merged 4 commits into
developfrom
feature/css

Conversation

@joshrmcdaniel

Copy link
Copy Markdown
Owner
  • Injected uBlock scriptlets now actually run
    • Even after the 0.7.0 scriptlet repair, every injected ##+js(...) scriptlet was a silent no-op. adblock-rust emits scriptlet bodies that reference an ambient scriptletGlobals object (uBlock Origin supplies it in its own injector; adblock-rust leaves it to the embedder), so the first internal call threw ReferenceError: scriptletGlobals is not defined, which each scriptlet's own try/catch swallowed. Privaxy now defines scriptletGlobals at the top of the injected payload, so abort-current-script, prevent-addEventListener, abort-on-property-read, set-cookie, etc. take effect.
  • Procedural cosmetic filtering
    • Non-CSS procedural filters are no longer dropped (previously only filters reducible to plain CSS were applied). :has-text, :matches-css/-before/-after, :matches-attr, :matches-path, :min-text-length, :upward, :xpath, and the :remove()/:style()/remove-attr/remove-class actions are now evaluated in-page by an injected shim.

@joshrmcdaniel joshrmcdaniel self-assigned this May 30, 2026
@zeropath-ai

zeropath-ai Bot commented May 30, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 6cf1a44.

Security Overview
Detected Code Changes
Change Type Relevant files
Configuration changes ► CHANGELOG.md
    Add v0.7.1 section
    Add v0.7.0 section
► privaxy/src/server/configuration/mod.rs
    Add DebugConfig struct
    Add SerializeError to ConfigurationError
    Add debug field to Configuration
    Implement atomic save for configuration file
Enhancement ► privaxy/src/resources/procedural_cosmetics.js
    Implement in-page procedural cosmetic filtering shim
► privaxy/src/server/blocker.rs
    Forward non-CSS procedural filters to the shim
► privaxy/src/server/lib.rs
    Pass scriptlet_debug_logging to privaxy_backend
► privaxy/src/server/proxy/html_rewriter.rs
    Inject procedural cosmetic shim into head
    Implement scriptlet_debug_logging logic
► privaxy/src/server/proxy/mitm.rs
    Pass scriptlet_debug_logging to serve_mitm_session
► privaxy/src/server/proxy/serve.rs
    Resolve and inject procedural cosmetic filters
    Pass scriptlet_debug_logging to serve
► privaxy/src/server/web_gui/settings/debug.rs
    Implement debug settings API endpoints
► privaxy/src/server/web_gui/settings/mod.rs
    Add debug settings route
► web_frontend/src/debug.rs
    Implement DebugSettingsPage component
► web_frontend/src/main.rs
    Import debug component
► web_frontend/src/settings.rs
    Add Debug route and link
Bug Fix ► CHANGELOG.md
    Fix cosmetic "modified responses" statistic undercount
    Injected uBlock scriptlets now actually run
► privaxy/src/server/proxy/html_rewriter.rs
    Fix scriptlet debugging to log errors
    Ensure injected scriptlets have scriptletGlobals defined
Refactor ► privaxy/src/server/blocker.rs
    Refactor procedural action handling
► privaxy/src/server/proxy/html_rewriter.rs
    Consolidate head script injection logic
► privaxy/src/server/proxy/serve.rs
    Combine scriptlet and procedural filter injection
Other ► CHANGELOG.md
    Add procedural cosmetic filtering to changelog

@joshrmcdaniel joshrmcdaniel merged commit 11ce299 into develop May 30, 2026
16 of 17 checks passed
@joshrmcdaniel joshrmcdaniel mentioned this pull request May 30, 2026
@joshrmcdaniel joshrmcdaniel deleted the feature/css branch May 30, 2026 20:51
joshrmcdaniel added a commit that referenced this pull request May 30, 2026
* add mipsbe (#26)

* add mips be

* release ci

* tag

* ci

* v4

* ci

* fix: correct adblock request typing, trim report-only CSP, and package MIPS debs/rpms (#27)

* request type from Sec-Fetch-Dest; capped block log line; report-only CSP no longer augmented

* request_type threaded into the engine check

* mips

* format

* fix host blocking

* keep filters on reload

* fix: cookie not invalidated (#28)

* fix auth

* fix blocking button

* bump to 0.7.1

* doh (#30)

* doh

* fmt

* Feature/doh (#31)

* doh

* fmt

* Forgot doh lol

* http2 adaptive window, add connect timeout (#32)

* filter validation (#33)

* docs: update docs (#34)

* docs

* ci

* feature/fix: css scriptlet, fix js scriptlet (#35)

* add css support, fix scriptlets

* debug setting entry

* changelog

* debug frontned

* feature: logging (#36)

* add css support, fix scriptlets

* debug setting entry

* changelog

* debug frontned

* logging

* changelog

* fix: mmtls (#37)

* mmtls tunneling

* timeout socket

* docs

* pac optimization

* buildmode arg

* lint rule
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