- iframe.src = src;
- iframe.id = "discourse-embed-frame";
- iframe.width = "100%";
- iframe.frameBorder = "0";
- iframe.scrolling = "no";
- iframe.referrerPolicy =
- DE.discourseReferrerPolicy || "no-referrer-when-downgrade";
- comments.appendChild(iframe);
- // Thanks http://amendsoft-javascript.blogspot.ca/2010/04/find-x-and-y-coordinate-of-html-control.html
- function findPosY(obj) {
- var top = 0;
- if (obj.offsetParent) {
- while (1) {
- top += obj.offsetTop;
- if (!obj.offsetParent) break;
- obj = obj.offsetParent;
- }
- } else if (obj.y) {
- top += obj.y;