Sha256: 2c9cb5841c7bf7534060fadcd640fbd4bcd6d83a931ef3f71b0f22b9efbcf26a

Contents?: true

Size: 461 Bytes

Versions: 88

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

88 entries across 88 versions & 1 rubygems

Version Path
decidim-core-0.13.0 app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.12.1 app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.13.0.pre1 app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.12.0 app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.11.2 app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.12.0.pre app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.11.1 app/assets/javascripts/decidim/widget.js.es6
decidim-core-0.11.0.pre1 app/assets/javascripts/decidim/widget.js.es6