Problem / Motivation

Many websites will prevent inline JavaScript through Content Security Policy (CSP), see https://content-security-policy.com/.

Because of this, this module will not work in that situation.

Proposed Resolution

Move the JavaScript snippet to an external file.

Optionally, allow a configuration for the site builder to choose whether to load the JavaScript inline or externally.

Comments

josephdpurcell created an issue. See original summary.

josephdpurcell’s picture

Status: Active » Needs review
StatusFileSize
new6.79 KB

Adding a patch on behalf of Tessari.

gtessari’s picture

StatusFileSize
new18.57 KB

Reviewed the first patch to change the script loading order.

josephdpurcell’s picture

diff --git a/d8_google_optimize_hide_page-3159870.patch b/d8_google_optimize_hide_page-3159870.patch

Don't include a patch in the patch itself.

Also, for subsequent patches, append the comment number. Ideally, also add an interdiff, though that can be a bit tricky.

  • webfaqtory committed b4319e3 on 8.x-1.x authored by gtessari
    Issue #3159870 by josephdpurcell, gtessari: Support for Content Security...
webfaqtory’s picture

Status: Needs review » Reviewed & tested by the community
webfaqtory’s picture

Assigned: Unassigned » webfaqtory
webfaqtory’s picture

Status: Reviewed & tested by the community » Fixed
webfaqtory’s picture

Status: Fixed » Closed (fixed)