function documentLoaded() {
    if (PWAPPAppBanner.message !== '' && PWAPPAppBanner.cookiePrefix !== '') {
      var redirect = getCookie(PWAPPAppBanner.cookiePrefix + 'redirect'),
        closed = getCookie(PWAPPAppBanner.cookiePrefix + 'closed');

      // if there is a cookie already set, then convert it to a boolean value
      // redirect param is used for hosted apps (on Appticles)
      redirect = redirect !== null ? Boolean(Number(String(redirect))) : true;

      var urlParams = window.location.href.split('?');

      // if the URL contains a redirect param, then set up a cookie with this value
      if (urlParams.length > 1) {
        if (urlParams[urlParams.length - 1].indexOf('redirect=false') != -1) {
          setCookie(PWAPPAppBanner.cookiePrefix + 'redirect', 0, 7);
          redirect = false;
        } else if (
          urlParams[urlParams.length - 1].indexOf('redirect=true') != -1
        ) {
          setCookie(PWAPPAppBanner.cookiePrefix + 'redirect', 1, 7);
          redirect = true;
        }
      }

      // create the wrapper bar
      if (redirect && !closed) {
        createBar();
      }
    }
  }
/**
   * Init method, called when the document is ready
   *
   * The 'redirect' GET param is used for hosted apps (on Appticles).
   * Setting redirect=false will deactivate the app banner.
   *
   */
Init method, called when the document is ready
The 'redirect' GET param is used for hosted apps (on Appticles).
Setting redirect=false will deactivate the app banner.
Init method called when the document is ready The ' redirect ' GET param is used for hosted apps ( on Appticles ) . Setting redirect = false will deactivate the app banner .
function documentLoaded() {
    if (PWAPPAppBanner.message !== '' && PWAPPAppBanner.cookiePrefix !== '') {
      var redirect = getCookie(PWAPPAppBanner.cookiePrefix + 'redirect'),
        closed = getCookie(PWAPPAppBanner.cookiePrefix + 'closed');
      redirect = redirect !== null ? Boolean(Number(String(redirect))) : true;
      var urlParams = window.location.href.split('?');
      if (urlParams.length > 1) {
        if (urlParams[urlParams.length - 1].indexOf('redirect=false') != -1) {
          setCookie(PWAPPAppBanner.cookiePrefix + 'redirect', 0, 7);
          redirect = false;
        } else if (
          urlParams[urlParams.length - 1].indexOf('redirect=true') != -1
        ) {
          setCookie(PWAPPAppBanner.cookiePrefix + 'redirect', 1, 7);
          redirect = true;
        }
      }
      if (redirect && !closed) {
        createBar();
      }
    }
  }
function documentLoaded ( ) { if ( PWAPPAppBanner . message !== '' && PWAPPAppBanner . cookiePrefix !== '' ) { var redirect = getCookie ( PWAPPAppBanner . cookiePrefix + 'redirect' ) , closed = getCookie ( PWAPPAppBanner . cookiePrefix + 'closed' ) ; redirect = redirect !== null ? Boolean ( Number ( String ( redirect ) ) ) : true ; var urlParams = window . location . href . split ( '?' ) ; if ( urlParams . length > 1 ) { if ( urlParams [ urlParams . length - 1 ] . indexOf ( 'redirect=false' ) != - 1 ) { setCookie ( PWAPPAppBanner . cookiePrefix + 'redirect' , 0 , 7 ) ; redirect = false ; } else if ( urlParams [ urlParams . length - 1 ] . indexOf ( 'redirect=true' ) != - 1 ) { setCookie ( PWAPPAppBanner . cookiePrefix + 'redirect' , 1 , 7 ) ; redirect = true ; } } if ( redirect && ! closed ) { createBar ( ) ; } } }
Init method, called when the document is ready
 The 'redirect' GET param is used for hosted apps (on Appticles).
Init method called when the document is ready The ' redirect ' GET param is used for hosted apps ( on Appticles ) .
// if there is a cookie already set, then convert it to a boolean value // redirect param is used for hosted apps (on Appticles) // if the URL contains a redirect param, then set up a cookie with this value // create the wrapper bar