klaro-org / klaro-js

Klaro Privacy Manager. An open-source, privacy-friendly & compliant consent manager for your website.
https://klaro.org
Other
1.19k stars 254 forks source link

Deactivate contextual consent placeholders? #400

Open user123801 opened 3 years ago

user123801 commented 3 years ago

I need to create custom placeholders for blocked content for a customer.

You can find some examples for placeholders on the following links: https://www.pfronten.de/unser-dorf/impressionen/#c4685 (in German, it's the blue box on the image that opens klaro when clicking on "Video ansehen") https://www.farm-holidays.com/#c8567 (the text "This video is hidden due to your cookie settings. Please click here to change your settings.") Both links show placeholders for YouTube videos. The examples don't use the latest klaro version, I think contextual consent didn't exist back then, but I need to use the latest version and can't use these examples.

I could hide them with CSS or write my own JS to remove them, but would like to avoid bypassing klaro. Is there a setting in klaro to deactivate contextual consent placeholders?

mbsouth commented 3 years ago

If you take a look at the source code of this site you will see a custom javascript file named <...>/klaro-overwrite.js. It seems the developer(s) did it also with JS and CSS.

To avoid bypassing klaro why don't using your own translation and change the wording according to your needs (?) like

var klarotranslations =  {
        ...
    ??: {
            contextualConsent: {
                description: 'Contextual description',
                acceptOnce: 'Accept Once Button Text',
                acceptAlways: 'Accept Always Button Text',
            },
      },
     ...
user123801 commented 3 years ago

@mbsouth Thanks for your input. What I would like to do is not just change the translation, but change the entire placeholder the way it's done for the examples, but preferably w/o writing my own JS. Is there a way to do that?