Sha256: 530f3614c3847a6603fd1432928f0d2858ae2ff4ee24430dadfd79c5553a0754

Contents?: true

Size: 461 Bytes

Versions: 49

Compression:

Stored size: 461 Bytes

Contents

window.addEventListener("message", (event) => {
  if (event.data.type === "GET_HEIGHT") {
    const body = document.body;
    const html = document.documentElement;
    const height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);

    parent.postMessage({ type: "SET_HEIGHT", height: height }, "*");
  }
});

$(() => {
  // Set target blank for all widget links.
  $('a').attr('target', '_blank');
});

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
decidim-core-0.6.6 app/assets/javascripts/decidim/widget.js.es6
decidim-0.6.6 decidim-core/app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.6.5 app/assets/javascripts/decidim/widget.js.es6
decidim-0.6.5 decidim-core/app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.6.4 app/assets/javascripts/decidim/widget.js.es6
decidim-0.6.4 decidim-core/app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.6.3 app/assets/javascripts/decidim/widget.js.es6
decidim-0.6.3 decidim-core/app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.6.2 app/assets/javascripts/decidim/widget.js.es6
decidim-0.6.2 decidim-core/app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.6.1 app/assets/javascripts/decidim/widget.js.es6
decidim-0.6.1 decidim-core/app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.6.0 app/assets/javascripts/decidim/widget.js.es6
decidim-0.6.0 decidim-core/app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.5.1 app/assets/javascripts/decidim/widget.js.es6
decidim-0.5.1 decidim-core/app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.5.0 app/assets/javascripts/decidim/widget.js.es6
decidim-0.5.0 decidim-core/app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.4.4 app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.4.2 app/assets/javascripts/decidim/widget.js.es6