github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/build-blockchain-insurance-app-master/web/src/common.js (about)

     1  /*global IBMCore*/
     2  import './common.scss';
     3  import './northstar.css';
     4  import './northstar-forms.css';
     5  import './northstar-tables.css';
     6  
     7  // Apply Internationalization Polyfill
     8  if (!window.Intl) {
     9    require('intl');
    10  }
    11  
    12  window.digitalData = {
    13    "page": {
    14      "category": {
    15        "primaryCategory": "Blockchain"
    16      },
    17      "pageInfo": {
    18        "language": "en-US",
    19        "publishDate": "2017-02-28",
    20        "publisher": "IBM Corporation",
    21        "version": "v18",
    22        "pageID": "None",
    23        "ibm": {
    24          "contentDelivery": "HTML"
    25        }
    26      }
    27    }
    28  };
    29  
    30  IBMCore.common.util.config.set({
    31    masthead: {
    32      type: "popup"
    33    },
    34    "footer": {
    35      "type": "alternate",
    36      "socialLinks": {
    37        "enabled": false
    38      }
    39    }
    40  });
    41  
    42  jQuery(() => {
    43    let regionSelector = jQuery('#region-selector');
    44    regionSelector.select2()
    45      .on('select2:select', () => {
    46        if(regionSelector.val()) {
    47          window.location.replace(window.location.pathname + '?applang=' + regionSelector.val());
    48        }
    49      });
    50  });