You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
580 B

var widgetsManagement={};
// Functions
widgetsManagement.createWidgets = function() {
var widgets = document.getElementsByClassName("iguana-widget");
for(var key in widgets) {
var iframeEL = document.createElement("iframe");
var widget = widgets[key];
widget.innerHTML="";
widget.appendChild(iframeEL);
iframeEL.src="//127.0.0.1:7777/widgets?id="+widget.getAttribute("data-ref");
iframeEL.style.width="100%";
iframeEL.style.height="100%";
iframeEL.style.border="0";
}
};
// Event Handlers
window.addEventListener('load', widgetsManagement.createWidgets);