DirkPersky / typo3-dp_cookieconsent

TYPO3 Extension: Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)
GNU Affero General Public License v3.0
32 stars 27 forks source link

Function? #56

Closed netfeld closed 4 years ago

netfeld commented 4 years ago

Try to get this to run with an simple example:

page.headerData.45678 = TEXT
page.headerData.45678.value(
    <script data-ignore="1" data-cookieconsent="statistics" type="text/javascript">
        alert("STATISTIC ACCEPTED");
    </script>
)

Result: The Script is fired all the time. Regardless of whether statistic checkbox is true or not.

DirkPersky commented 4 years ago

He @netfeld

you have to change the type to type="text/plain"

page.headerData.45678 = TEXT
page.headerData.45678.value(
    <script data-ignore="1" data-cookieconsent="statistics" type="text/plain">
        alert("STATISTIC ACCEPTED");
    </script>
)

after that it works ;)

netfeld commented 4 years ago

Great! I missed that. Thanks, Hauke