diff options
author | George Hazan <george.hazan@gmail.com> | 2012-05-18 12:40:57 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-05-18 12:40:57 +0000 |
commit | e52a0809b8274aea24d7398e87f34e4d78f9877c (patch) | |
tree | 1787bcac952dcea253c64842111c6be016fc3f70 /protocols/MRA/Docs/Mail.ru Agent.files/WindowOpen.js | |
parent | 371d5397795afd1d1aa65c4acacf7587ff0a110e (diff) |
renamed help files for MRA
git-svn-id: http://svn.miranda-ng.org/main/trunk@40 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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 |