I would like to know if I can get a list of popups opened by window.open javascript function call.
I want to run some code after all these pages are closed. I don\'
you can use localstorage to do this. I am also using a localstorage plugin so the set and get are short hand.
function Op(r,rr,rrr){
if(!rrr){rrr={};};if(!rrr.n){rrr.n='PopUps'}
ii={o:jQuery.localStorage.get(rrr.n)}
if(!ii.o){
switch(rrr.n){
case'unmOptions':
ii.o={audio0:1,audio1:1}
break;
default:
ii.o={p:{}}
break;
}
}
if(r&&rr&&!rrr.x){
ii.o[r]=rr;
}
switch(rrr.x){
case 0:
delete(ii.o[r])
break;
case 1:
delete(ii.o[r][rr])
break;
}
jQuery.localStorage.set(rrr.n,ii.o)
return ii.o
}
How to get object of windows
Op()
Op().p['window1']
to set values
Op('key','value')
to delete values
Op('key','',{x:0})