htmx icon indicating copy to clipboard operation
htmx copied to clipboard

CSP issue with IndicatorStyles - needs a htmx.config.inlineStyleNonce config option

Open Kimotu opened this issue 3 years ago • 0 comments

Please add config option htmx.config.inlineStyleNonce:'' and extend function insertIndicatorStyles to include:

"<style nonce=\"" + htmx.config.inlineStyleNonce + "\">\
                      ." + htmx.config.indicatorClass + "{opacity:0;transition: opacity 200ms ease-in;}\
                      ." + htmx.config.requestClass + " ." + htmx.config.indicatorClass + "{opacity:1}\
                      ." + htmx.config.requestClass + "." + htmx.config.indicatorClass + "{opacity:1}\
                    </style>");

Tested it in a locale modified installation. Works.

Kimotu avatar Sep 28 '22 08:09 Kimotu