Sha256: 5e016b08333dab1f2ec9f39f139100724225bcc549b8bcee03cc682b0eafb982

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

import footerDate from './footerDate.js';
import lazyLoad from './lazyLoad.js';
import walkText from './walkText.js';
import initSliders from './sliders.js';
import watchForMenuClicks from './translate.js';
import wrapPowerText from './wrapPowerText.js';
import ytEmbed from './ytEmbed.js';
//import test from './test.js';

document.addEventListener('DOMContentLoaded', function() {
  wrapPowerText();
  initSliders();
  walkText(document.body);
  footerDate();
  lazyLoad();
  watchForMenuClicks();

  document.getElementById('yt-embed') ? ytEmbed() : null;

  // polyfill for Element.closest() b/c IE can't handle an anchor.match() when the anchor has another element inside it (Like spans used for BS4 menu toggler)
  if (!Element.prototype.matches) {
    Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
  }

  if (!Element.prototype.closest) {
    Element.prototype.closest = function(s) {
      var el = this;

      do {
        if (el.matches(s)) return el;
        el = el.parentElement || el.parentNode;
      } while (el !== null && el.nodeType === 1);
      return null;
    };
  }
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
kcc-gem-theme-1.58.36 assets/js/theme/src/all.js
kcc-gem-theme-1.57.36 assets/js/theme/src/all.js
kcc-gem-theme-1.56.36 assets/js/theme/src/all.js
kcc-gem-theme-1.55.36 assets/js/theme/src/all.js