MediaWiki:Common.js: Difference between revisions

No edit summary
No edit summary
 
Line 121: Line 121:
} );
} );


document.addEventListener("DOMContentLoaded", function () {
  const params = new URLSearchParams(window.location.search);
  const point = params.get("point");
  const iframe = document.getElementById("self-esteem-frame");
  if (iframe && point) {
    iframe.addEventListener("load", () => {
      iframe.contentWindow.postMessage(
        { point: parseInt(point) },
        "https://test.magazine-d.com"
      );
    });
  }
});
/* DO NOT ADD CODE BELOW THIS LINE */
/* DO NOT ADD CODE BELOW THIS LINE */