Plugin Directory

Changeset 341143


Ignore:
Timestamp:
02/05/2011 01:29:10 PM (15 years ago)
Author:
Gecka
Message:

Compresses the javascript

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gecka-ie-warning/trunk/ie/warning.js

    r341134 r341143  
    1 var url1 = "http://www.microsoft.com/windows/Internet-explorer/default.aspx";
    2 var url2 = "http://www.mozilla.com/firefox/";
    3 var url3 = "http://www.apple.com/safari/download/";
    4 var url4 = "http://www.opera.com/download/";
    5 var url5 = "http://www.google.com/chrome";
    6 
    7 var imgPath;
    8 
    9 function iew(str) {
    10 
    11     if (iews.cookie != '0' && iewrc('iew_dontShowAgain'))
    12         return false;
    13    
    14     imgPath = str;
    15 
    16     var _body = document.getElementsByTagName('body')[0];
    17     var _d = document.createElement('div');
    18     var _l = document.createElement('div');
    19     var _h = document.createElement('h1');
    20     var _p1 = document.createElement('p');
    21     var _p2 = document.createElement('p');
    22     var _ul = document.createElement('ul');
    23     var _li1 = document.createElement('li');
    24     var _li2 = document.createElement('li');
    25     var _li3 = document.createElement('li');
    26     var _li4 = document.createElement('li');
    27     var _li5 = document.createElement('li');
    28     var _ico1 = document.createElement('div');
    29     var _ico2 = document.createElement('div');
    30     var _ico3 = document.createElement('div');
    31     var _ico4 = document.createElement('div');
    32     var _ico5 = document.createElement('div');
    33     var _lit1 = document.createElement('div');
    34     var _lit2 = document.createElement('div');
    35     var _lit3 = document.createElement('div');
    36     var _lit4 = document.createElement('div');
    37     var _lit5 = document.createElement('div');
    38     var _p3 = document.createElement('p');
    39 
    40     _body.appendChild(_l);
    41     _body.appendChild(_d);
    42     _d.appendChild(_h);
    43     _d.appendChild(_p1);
    44     _d.appendChild(_p2);
    45     _d.appendChild(_ul);
    46     _ul.appendChild(_li1);
    47     _ul.appendChild(_li2);
    48     _ul.appendChild(_li3);
    49     _ul.appendChild(_li4);
    50     _ul.appendChild(_li5);
    51     _li1.appendChild(_ico1);
    52     _li2.appendChild(_ico2);
    53     _li3.appendChild(_ico3);
    54     _li4.appendChild(_ico4);
    55     _li5.appendChild(_ico5);
    56     _li1.appendChild(_lit1);
    57     _li2.appendChild(_lit2);
    58     _li3.appendChild(_lit3);
    59     _li4.appendChild(_lit4);
    60     _li5.appendChild(_lit5);
    61     _d.appendChild(_p3);
    62 
    63     _d.setAttribute('id', '_d');
    64     _l.setAttribute('id', '_l');
    65     _h.setAttribute('id', '_h');
    66     _p1.setAttribute('id', '_p1');
    67     _p2.setAttribute('id', '_p2');
    68     _ul.setAttribute('id', '_ul');
    69 
    70     _li1.setAttribute('id', '_li1');
    71     _li2.setAttribute('id', '_li2');
    72     _li3.setAttribute('id', '_li3');
    73     _li4.setAttribute('id', '_li4');
    74     _li5.setAttribute('id', '_li5');
    75     _ico1.setAttribute('id', '_ico1');
    76     _ico2.setAttribute('id', '_ico2');
    77     _ico3.setAttribute('id', '_ico3');
    78     _ico4.setAttribute('id', '_ico4');
    79     _ico5.setAttribute('id', '_ico5');
    80     _lit1.setAttribute('id', '_lit1');
    81     _lit2.setAttribute('id', '_lit2');
    82     _lit3.setAttribute('id', '_lit3');
    83     _lit4.setAttribute('id', '_lit4');
    84     _lit5.setAttribute('id', '_lit5');
    85     _p3.setAttribute('id', '_p3');
    86 
    87     var _width = document.documentElement.clientWidth;
    88     var _height = document.documentElement.clientHeight;
    89 
    90     var _dl = document.getElementById('_l');
    91     _dl.style.width = _width + "px";
    92     _dl.style.height = _height + "px";
    93     _dl.style.position = "absolute";
    94     _dl.style.zIndex = "2000000";
    95     _dl.style.top = "0px";
    96     _dl.style.left = "0px";
    97     _dl.style.filter = "alpha(opacity=50)";
    98     _dl.style.background = "#fff";
    99 
    100     var _dd = document.getElementById('_d');
    101     _ddw = 650;
    102     _ddh = 260;
    103     _dd.style.width = _ddw + "px";
    104     _dd.style.height = _ddh + "px";
    105     _dd.style.position = "absolute";
    106     _dd.style.zIndex = "2000001";
    107     _dd.style.top = ((_height - _ddh) / 2) + "px";
    108     _dd.style.left = ((_width - _ddw) / 2) + "px";
    109     _dd.style.padding = "20px";
    110     _dd.style.background = "#fff";
    111     _dd.style.border = "1px solid #ccc";
    112     _dd.style.fontFamily = "'Lucida Grande','Lucida Sans Unicode',Arial,Verdana,sans-serif";
    113     _dd.style.listStyleType = "none";
    114     _dd.style.color = "#4F4F4F";
    115     _dd.style.fontSize = "12px";
    116     _h.appendChild(document.createTextNode(iews.msg1));
    117 
    118     var _hd = document.getElementById('_h');
    119     _hd.style.display = "block";
    120     _hd.style.fontSize = "1.3em";
    121     _hd.style.marginBottom = "0.5em";
    122     _hd.style.color = "#333";
    123     _hd.style.fontFamily = "Helvetica,Arial,sans-serif";
    124     _hd.style.fontWeight = "bold";
    125     _p1.appendChild(document.createTextNode(iews.msg2));
    126 
    127     var _p1d = document.getElementById('_p1');
    128     _p1d.style.marginBottom = "1em";
    129     _p2.appendChild(document.createTextNode(iews.msg3));
    130 
    131     var _p2d = document.getElementById('_p2');
    132     _p2d.style.marginBottom = "1em";
    133     _p3.innerHTML = '<a href="#" onclick="iewc();">' + iews.msg4 + '</a>';
    134 
    135     var _uld = document.getElementById('_ul');
    136     _uld.style.listStyleImage = "none";
    137     _uld.style.listStylePosition = "outside";
    138     _uld.style.listStyleType = "none";
    139     _uld.style.margin = "0 px auto";
    140     _uld.style.padding = "0px";
    141     _uld.style.paddingLeft = "10px";
    142 
    143     var _li1d = document.getElementById('_li1');
    144     var _li2d = document.getElementById('_li2');
    145     var _li3d = document.getElementById('_li3');
    146     var _li4d = document.getElementById('_li4');
    147     var _li5d = document.getElementById('_li5');
    148     var _li1ds = _li1d.style;
    149     var _li2ds = _li2d.style;
    150     var _li3ds = _li3d.style;
    151     var _li4ds = _li4d.style;
    152     var _li5ds = _li5d.style;
    153 
    154     _li1ds.background = _li2ds.background = _li3ds.background = _li4ds.background = _li5ds.background = "transparent url('"
    155             + imgPath + "background_browser.gif') no-repeat scroll left top";
    156     _li1ds.cursor = _li2ds.cursor = _li3ds.cursor = _li4ds.cursor = _li5ds.cursor = "pointer";
    157     _l.onclick = iewc;
    158     _li1d.onclick = function() {
    159         window.location = url1;
    160     };
    161     _li2d.onclick = function() {
    162         window.location = url2;
    163     };
    164     _li3d.onclick = function() {
    165         window.location = url3;
    166     };
    167     _li4d.onclick = function() {
    168         window.location = url4;
    169     };
    170     _li5d.onclick = function() {
    171         window.location = url5;
    172     };
    173 
    174     _li1ds.styleFloat = _li2ds.styleFloat = _li3ds.styleFloat = _li4ds.styleFloat = _li5ds.styleFloat = "left";
    175     _li1ds.width = _li2ds.width = _li3ds.width = _li4ds.width = _li5ds.width = "120px";
    176     _li1ds.height = _li2ds.height = _li3ds.height = _li4ds.height = _li5ds.height = "122px";
    177     _li1ds.margin = _li2ds.margin = _li3ds.margin = _li4ds.margin = _li5ds.margin = "0 10px 10px 0";
    178 
    179     var _ico1d = document.getElementById('_ico1');
    180     var _ico2d = document.getElementById('_ico2');
    181     var _ico3d = document.getElementById('_ico3');
    182     var _ico4d = document.getElementById('_ico4');
    183     var _ico5d = document.getElementById('_ico5');
    184     var _ico1ds = _ico1d.style;
    185     var _ico2ds = _ico2d.style;
    186     var _ico3ds = _ico3d.style;
    187     var _ico4ds = _ico4d.style;
    188     var _ico5ds = _ico5d.style;
    189 
    190     _ico1ds.width = _ico2ds.width = _ico3ds.width = _ico4ds.width = _ico5ds.width = "100px";
    191     _ico1ds.height = _ico2ds.height = _ico3ds.height = _ico4ds.height = _ico5ds.height = "100px";
    192     _ico1ds.margin = _ico2ds.margin = _ico3ds.margin = _ico4ds.margin = _ico5ds.margin = "1px auto";
    193 
    194     _ico1ds.background = "transparent url('" + imgPath
    195             + "browser_ie.gif') no-repeat scroll left top";
    196     _ico2ds.background = "transparent url('" + imgPath
    197             + "browser_firefox.gif') no-repeat scroll left top";
    198     _ico3ds.background = "transparent url('" + imgPath
    199             + "browser_safari.gif') no-repeat scroll left top";
    200     _ico4ds.background = "transparent url('" + imgPath
    201             + "browser_opera.gif') no-repeat scroll left top";
    202     _ico5ds.background = "transparent url('" + imgPath
    203             + "browser_chrome.gif') no-repeat scroll left top";
    204 
    205     _lit1.appendChild(document.createTextNode(iews.br1));
    206     _lit2.appendChild(document.createTextNode(iews.br2));
    207     _lit3.appendChild(document.createTextNode(iews.br3));
    208     _lit4.appendChild(document.createTextNode(iews.br4));
    209     _lit5.appendChild(document.createTextNode(iews.br5));
    210 
    211     var _lit1d = document.getElementById('_lit1');
    212     var _lit2d = document.getElementById('_lit2');
    213     var _lit3d = document.getElementById('_lit3');
    214     var _lit4d = document.getElementById('_lit4');
    215     var _lit5d = document.getElementById('_lit5');
    216 
    217     var _lit1ds = _lit1d.style;
    218     var _lit2ds = _lit2d.style;
    219     var _lit3ds = _lit3d.style;
    220     var _lit4ds = _lit4d.style;
    221     var _lit5ds = _lit5d.style;
    222 
    223     _lit1ds.color = _lit2ds.color = _lit3ds.color = _lit4ds.color = _lit5ds.color = "#808080";
    224     _lit1ds.fontSize = _lit2ds.fontSize = _lit3ds.fontSize = _lit4ds.fontSize = _lit5ds.fontSize = "0.8em";
    225     _lit1ds.height = _lit2ds.height = _lit3ds.height = _lit4ds.height = _lit5ds.height = "18px";
    226     _lit1ds.lineHeight = _lit2ds.lineHeight = _lit3ds.lineHeight = _lit4ds.lineHeight = _lit5ds.lineHeight = "17px";
    227     _lit1ds.margin = _lit2ds.margin = _lit3ds.margin = _lit4ds.margin = _lit5ds.margin = "1px auto";
    228     _lit1ds.width = _lit2ds.width = _lit3ds.width = _lit4ds.width = _lit5ds.width = "118px";
    229     _lit1ds.textAlign = _lit2ds.textAlign = _lit3ds.textAlign = _lit4ds.textAlign = _lit5ds.textAlign = "center";
    230 }
    231 
    232 function iewc() {
    233     var _l = document.getElementById('_l');
    234     var _d = document.getElementById('_d');
    235     _l.style.display = 'none';
    236     _d.style.display = 'none';
    237     if(iews.cookie != 'no') iewcc('iew_dontShowAgain', 1, iews.cookie);
    238 }
    239 
    240 function iewcc(name, value, days) {
    241     if (days) {
    242         var date = new Date();
    243         date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
    244         var expires = ";expires=" + date.toGMTString();
    245     } else
    246         var expires = "";
    247     document.cookie = name + "=" + value + expires + ";path=/";
    248 }
    249 
    250 function iewrc(name) {
    251     var nameEQ = name + "=";
    252     var ca = document.cookie.split(';');
    253     for ( var i = 0; i < ca.length; i++) {
    254         var c = ca[i];
    255         while (c.charAt(0) == ' ')
    256             c = c.substring(1, c.length);
    257         if (c.indexOf(nameEQ) == 0)
    258             return c.substring(nameEQ.length, c.length);
    259     }
    260     return null;
    261 }
     1var url1="http://www.microsoft.com/windows/Internet-explorer/default.aspx";var url2="http://www.mozilla.com/firefox/";var url3="http://www.apple.com/safari/download/";var url4="http://www.opera.com/download/";var url5="http://www.google.com/chrome";var imgPath;function iew(g){if(iews.cookie!='0'&&iewrc('iew_dontShowAgain'))return false;imgPath=g;var e=document.getElementsByTagName('body')[0];var b=document.createElement('div');var d=document.createElement('div');var a=document.createElement('h1');var E=document.createElement('p');var F=document.createElement('p');var h=document.createElement('ul');var u=document.createElement('li');var v=document.createElement('li');var w=document.createElement('li');var x=document.createElement('li');var y=document.createElement('li');var M=document.createElement('div');var N=document.createElement('div');var O=document.createElement('div');var P=document.createElement('div');var Q=document.createElement('div');var G=document.createElement('div');var H=document.createElement('div');var I=document.createElement('div');var J=document.createElement('div');var K=document.createElement('div');var L=document.createElement('p');e.appendChild(d);e.appendChild(b);b.appendChild(a);b.appendChild(E);b.appendChild(F);b.appendChild(h);h.appendChild(u);h.appendChild(v);h.appendChild(w);h.appendChild(x);h.appendChild(y);u.appendChild(M);v.appendChild(N);w.appendChild(O);x.appendChild(P);y.appendChild(Q);u.appendChild(G);v.appendChild(H);w.appendChild(I);x.appendChild(J);y.appendChild(K);b.appendChild(L);b.setAttribute('id','_0');d.setAttribute('id','_1');a.setAttribute('id','_4');E.setAttribute('id','_5');F.setAttribute('id','_6');h.setAttribute('id','_7');u.setAttribute('id','_8');v.setAttribute('id','_9');w.setAttribute('id','_a');x.setAttribute('id','_b');y.setAttribute('id','_c');M.setAttribute('id','_d');N.setAttribute('id','_e');O.setAttribute('id','_f');P.setAttribute('id','_g');Q.setAttribute('id','_h');G.setAttribute('id','_i');H.setAttribute('id','_j');I.setAttribute('id','_k');J.setAttribute('id','_l');K.setAttribute('id','_m');L.setAttribute('id','_n');var R=document.documentElement.clientWidth;var S=document.documentElement.clientHeight;var f=document.getElementById('_1');f.style.width=R+"px";f.style.height=S+"px";f.style.position="absolute";f.style.zIndex="2000000";f.style.top="0px";f.style.left="0px";f.style.filter="alpha(opacity=50)";f.style.background="#fff";var c=document.getElementById('_0');_2=650;_3=260;c.style.width=_2+"px";c.style.height=_3+"px";c.style.position="absolute";c.style.zIndex="2000001";c.style.top=((S-_3)/2)+"px";c.style.left=((R-_2)/2)+"px";c.style.padding="20px";c.style.background="#fff";c.style.border="1px solid #ccc";c.style.fontFamily="'Lucida Grande','Lucida Sans Unicode',Arial,Verdana,sans-serif";c.style.listStyleType="none";c.style.color="#4F4F4F";c.style.fontSize="12px";a.appendChild(document.createTextNode(iews.msg1));var n=document.getElementById('_4');n.style.display="block";n.style.fontSize="1.3em";n.style.marginBottom="0.5em";n.style.color="#333";n.style.fontFamily="Helvetica,Arial,sans-serif";n.style.fontWeight="bold";E.appendChild(document.createTextNode(iews.msg2));var Y=document.getElementById('_5');Y.style.marginBottom="1em";F.appendChild(document.createTextNode(iews.msg3));var Z=document.getElementById('_6');Z.style.marginBottom="1em";L.innerHTML='<a href="#" onclick="iewc();">'+iews.msg4+'</a>';var o=document.getElementById('_7');o.style.listStyleImage="none";o.style.listStylePosition="outside";o.style.listStyleType="none";o.style.margin="0 px auto";o.style.padding="0px";o.style.paddingLeft="10px";var T=document.getElementById('_8');var U=document.getElementById('_9');var V=document.getElementById('_a');var W=document.getElementById('_b');var X=document.getElementById('_c');var p=T.style;var q=U.style;var r=V.style;var s=W.style;var t=X.style;p.background=q.background=r.background=s.background=t.background="transparent url('"+imgPath+"background_browser.gif') no-repeat scroll left top";p.cursor=q.cursor=r.cursor=s.cursor=t.cursor="pointer";d.onclick=iewc;T.onclick=function(){window.location=url1};U.onclick=function(){window.location=url2};V.onclick=function(){window.location=url3};W.onclick=function(){window.location=url4};X.onclick=function(){window.location=url5};p.styleFloat=q.styleFloat=r.styleFloat=s.styleFloat=t.styleFloat="left";p.width=q.width=r.width=s.width=t.width="120px";p.height=q.height=r.height=s.height=t.height="122px";p.margin=q.margin=r.margin=s.margin=t.margin="0 10px 10px 0";var ba=document.getElementById('_d');var bb=document.getElementById('_e');var bc=document.getElementById('_f');var bd=document.getElementById('_g');var be=document.getElementById('_h');var z=ba.style;var A=bb.style;var B=bc.style;var C=bd.style;var D=be.style;z.width=A.width=B.width=C.width=D.width="100px";z.height=A.height=B.height=C.height=D.height="100px";z.margin=A.margin=B.margin=C.margin=D.margin="1px auto";z.background="transparent url('"+imgPath+"browser_ie.gif') no-repeat scroll left top";A.background="transparent url('"+imgPath+"browser_firefox.gif') no-repeat scroll left top";B.background="transparent url('"+imgPath+"browser_safari.gif') no-repeat scroll left top";C.background="transparent url('"+imgPath+"browser_opera.gif') no-repeat scroll left top";D.background="transparent url('"+imgPath+"browser_chrome.gif') no-repeat scroll left top";G.appendChild(document.createTextNode(iews.br1));H.appendChild(document.createTextNode(iews.br2));I.appendChild(document.createTextNode(iews.br3));J.appendChild(document.createTextNode(iews.br4));K.appendChild(document.createTextNode(iews.br5));var bf=document.getElementById('_i');var bg=document.getElementById('_j');var bh=document.getElementById('_k');var bi=document.getElementById('_l');var bj=document.getElementById('_m');var i=bf.style;var j=bg.style;var k=bh.style;var l=bi.style;var m=bj.style;i.color=j.color=k.color=l.color=m.color="#808080";i.fontSize=j.fontSize=k.fontSize=l.fontSize=m.fontSize="0.8em";i.height=j.height=k.height=l.height=m.height="18px";i.lineHeight=j.lineHeight=k.lineHeight=l.lineHeight=m.lineHeight="17px";i.margin=j.margin=k.margin=l.margin=m.margin="1px auto";i.width=j.width=k.width=l.width=m.width="118px";i.textAlign=j.textAlign=k.textAlign=l.textAlign=m.textAlign="center"}function iewc(){var g=document.getElementById('_1');var e=document.getElementById('_0');g.style.display='none';e.style.display='none';if(iews.cookie!='no')iewcc('iew_dontShowAgain',1,iews.cookie)}function iewcc(g,e,b){if(b){var d=new Date();d.setTime(d.getTime()+(b*24*60*60*1000));var a=";expires="+d.toGMTString()}else var a="";document.cookie=g+"="+e+a+";path=/"}function iewrc(g){var e=g+"=";var b=document.cookie.split(';');for(var d=0;d<b.length;d++){var a=b[d];while(a.charAt(0)==' ')a=a.substring(1,a.length);if(a.indexOf(e)==0)return a.substring(e.length,a.length)}return null}
Note: See TracChangeset for help on using the changeset viewer.