diff options
Diffstat (limited to 'protocols/MRA/Docs/Mail.ru Agent.files/WindowOpen.js')
-rw-r--r-- | protocols/MRA/Docs/Mail.ru Agent.files/WindowOpen.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/protocols/MRA/Docs/Mail.ru Agent.files/WindowOpen.js b/protocols/MRA/Docs/Mail.ru Agent.files/WindowOpen.js new file mode 100644 index 0000000000..e5f140e382 --- /dev/null +++ b/protocols/MRA/Docs/Mail.ru Agent.files/WindowOpen.js @@ -0,0 +1,44 @@ +//
+// Proxomitron Anti-popup code
+//
+
+var PrxLC=new Date(0);
+var PrxModAtr=0;
+var PrxLd=1;
+var PrxInst; if(!PrxInst++) PrxRealOpen=window.open;
+
+function PrxOMUp(){PrxLC=new Date();}
+function PrxNW(){return(this.window);}
+function PrxOpen(url,nam,atr){
+ if(PrxLC){
+ var cdt=new Date();
+ cdt.setTime(cdt.getTime()-PrxLC.getTime());
+ if(!PrxLd && cdt.getSeconds()<2){
+ if(atr){ return(PrxRealOpen(url,nam,PrxWOA(atr))); }
+ else{ return(PrxRealOpen(url,nam)); }
+ }
+ }
+ return(new PrxNW());
+}
+
+function PrxWOA(atr){
+ var xatr="location=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes";
+ if(!PrxModAtr) return(atr);
+ if(atr){
+ var hm;
+ hm=atr.match(/height\=[0-9]+/i);
+ if(hm) xatr+="," + hm;
+ hm=atr.match(/width\=[0-9]+/i);
+ if(hm) xatr+="," + hm;
+ }
+ return(xatr);
+}
+
+function PrxRST(){
+ if(document.layers){document.captureEvents(Event.MOUSEUP);}
+ document.onmouseup=PrxOMUp;
+ PrxLd=0;
+}
+
+window.open=PrxOpen;
+submit=PrxOpen;
\ No newline at end of file |