Sha256: 1cf721e48b5a20fa7b94d7598726ba5fcab24213b53cbf7500dc74b8d1a217c8

Contents?: true

Size: 984 Bytes

Versions: 6

Compression:

Stored size: 984 Bytes

Contents

const init = () => {
    // Load configuration
    const request = new Request(window.conference.config.baseurl + '/assets/js/config.json');

    fetch(request)
    .then(response =>
        response.json()
    )
    .then(config => {
        // Add configuration to global scope
        window.conference.config = Object.assign(window.conference.config, config);

        // Execute initialization functions
        for (const [name, module] of Object.entries(window.conference)) {
            if (['config','ready','awaitReady'].includes(name)) {
                continue;
            }

            let c;
            if (name in config) {
                c = config[name];
            }
            let l;
            if (name in config.lang) {
                l = config.lang[name];
            }

            module.init(c, l);
        }

    }).then(() => {
        window.conference.ready = true;
    })
    .catch((error) => {
        console.log(error);
    });
};

init();

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
devops4lib-jekyll-theme-conference-0.0.1 _includes/js/init.js
jekyll-theme-conference-3.6.6 _includes/js/init.js
jekyll-theme-conference-3.6.5 _includes/js/init.js
jekyll-theme-conference-3.6.4 _includes/js/init.js
jekyll-theme-conference-3.6.3 _includes/js/init.js
jekyll-theme-conference-3.6.2 _includes/js/init.js