Your IP : 216.73.216.43


Current Path : /home/rtorresani/www/vendor/iubenda/module-cookiesolution/view/frontend/templates/
Upload File :
Current File : //home/rtorresani/www/vendor/iubenda/module-cookiesolution/view/frontend/templates/notice.phtml

<?php
/** @var Iubenda\CookieSolution\Block\CookieSolution $block */
// get helper
$helper = $block->getHelper();

// get JavaScript code
$code = $helper->getJsCode();

// code exists?
if (trim($code) !== '') {
    /* @noEscape */ echo $code;
    ?>
    <script type="text/javascript">
        var iCallback = function () {};

        if ( 'callback' in _iub.csConfiguration ) {
            if ( 'onConsentGiven' in _iub.csConfiguration.callback )
                iCallback = _iub.csConfiguration.callback.onConsentGiven;

            _iub.csConfiguration.callback.onConsentGiven = function () {
                iCallback();

                jQuery( 'noscript._no_script_iub' ).each( function ( a, b ) {
                    var el = jQuery( b );
                    el.after( el.html() );
                } );
            };
        }
        ;
    </script>
    <?php
}