# cookiebot/4.7.5/assets/js/backend/consent-mapping.js

Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA &amp; Google Consent Mode, version 4.7.5. 23 lines.

- Page: https://pluginprobe.com/plugins/cookiebot/4.7.5/code/assets/js/backend/consent-mapping.js
- Raw: https://pluginprobe.com/plugins/cookiebot/4.7.5/raw/assets/js/backend/consent-mapping.js
- Modified: 2025-01-28T12:24:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/cookiebot/4.7.5/code/assets/js/backend/consent-mapping.js#L10-L20`.

```javascript
'use strict';
(window => {
    jQuery('#cb-consent-api-reset-defaults').on('click',resetConsentMapping);
function resetConsentMapping() {
    if ( confirm( 'Are you sure you want to reset to default consent mapping?' ) ) {
        const resetButton = jQuery(this);
        if(resetButton.hasClass('uc-consent')){
            const categorySelectors = jQuery('.cb-category-selectors');
            categorySelectors.each(function(){
                const defaultCategory = jQuery(this).attr('data-default');
                jQuery(this).val(defaultCategory).change();
            });
        } else {
            jQuery('.cb-settings__consent__mapping-table input[type=checkbox]').each(function () {
                if (!jQuery(this).prop('disabled')) {
                    jQuery(this).prop('checked', jQuery(this).data('default-value'));
                }
            })
        }
        jQuery('p.submit #submit').addClass('enabled');
    }
}
})(window);
```
