From 0bfbf0f82e2172d042d80d46c4f731c4c0adcd68 Mon Sep 17 00:00:00 2001 From: Jonas Eberle Date: Wed, 16 Sep 2020 20:23:28 +0200 Subject: [PATCH] add API for consenting #158 --- Documentation/Developer/Index.rst | 18 ++- Resources/Public/Js/cookieman.js | 10 ++ Resources/Public/Js/cookieman.min.js | 2 +- Resources/Public/Js/js.cookie.min.js | 163 --------------------------- 4 files changed, 25 insertions(+), 168 deletions(-) diff --git a/Documentation/Developer/Index.rst b/Documentation/Developer/Index.rst index 3fe9b080..d1dee9af 100644 --- a/Documentation/Developer/Index.rst +++ b/Documentation/Developer/Index.rst @@ -59,6 +59,18 @@ cookieman.hide() Hides the confirmation modal. +cookieman.consent(groupKey) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +:aspect:`Description` + Adds the given group (e.g. 'marketing') to the consented groups, updates the CookieConsent cookie + and injects all items given each corresponding trackingObject's `inject` section. + + This is meant as a programmatic way to implement banners before showing content from external sources such as YouTube + videos, Google Maps, facebook posts, ... – clicking the "yes, show the content"-button would call this function and a + `