i have simple chrome extension that opens JQuery dialog box on each tab i open ,
the problem is when web page has iframe in it , the dialog box opens as many iframes are in the page .
i want to avoid this , all i need it open only and only 1 instance of the Dialog box for each page .
how can i avoid the iframes in the page ?
this is my content script :
var layerNode= document.createElement('div');
layerNode.setAttribute('id','dialog');
layerNode.setAttribute('title','Basic dialog');
var pNode= document.createElement('p');
console.log("msg var: "+massage);
pNode.innerHTML = massage;
layerNode.appendChild(pNode);
document.body.appendChild(layerNode);
jQuery("#dialog").dialog({
autoOpen: true,
draggable: true,
resizable: true,
height: 'auto',
width: 500,
zIndex:3999,
modal: false,
open: function(event, ui) {
$(event.target).parent().css('position','fixed');
$(event.target).parent().css('top', '5px');
$(event.target).parent().css('left', '10px');
}
});