diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2015-05-02 07:21:23 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2015-05-02 07:21:23 +0000 |
commit | a519dcd7b93e6e78a25f1ccb1d9261a4ba853981 (patch) | |
tree | f9d737a3799666cf67ce9a048ebc917ba71acd26 /protocols/MRA/docs/Mail.ru Agent.files/WindowOpen.js | |
parent | 136e53ee849e3de39c92c66ee1993c170f65399c (diff) |
cosmetics
git-svn-id: http://svn.miranda-ng.org/main/trunk@13357 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 |