~ubuntu-branches/ubuntu/trusty/jwchat/trusty

« back to all changes in this revision

Viewing changes to pngfix.js.es_ga

  • Committer: Bazaar Package Importer
  • Author(s): Lincoln de Sousa, Lincoln de Sousa, Marcelo Jorge Vieira
  • Date: 2010-09-16 11:42:28 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100916114228-5s5ne28n1w6wrfbl
Tags: 1.0+dfsg-1
[Lincoln de Sousa]

* Switch to dpkg-source 3.0 (quilt) format
* Migrating package from cdbs to debhelper 7.0.50~
* Changing the rule get-orig-source to generate a dfsg compatible
  package striping swf files from the orig (Closes: #591962)
* Updated Standards-Version to 3.9.1
* Removing po-debconf from the Build-Depends-Indep list.

[Marcelo Jorge Vieira]

* Fixing the default backend
* Fixing Debugger dependency
* Changing information about packaging from old maintainers to
  Debian XMPP Team.
* Removing sound support.
* Setting a port for apache VirtualHost.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
2
 
   {
3
 
   for(var i=0; i<document.images.length; i++)
4
 
      {
5
 
        if (navigator.userAgent.indexOf('MSIE') == -1)
6
 
          return;
7
 
 
8
 
        if (navigator.userAgent.indexOf('MSIE 5')>0 && navigator.userAgent.indexOf('MSIE 5.5')==-1) 
9
 
          return; // don't break IE 5.0
10
 
 
11
 
          var img = document.images[i]
12
 
          var imgName = img.src.toUpperCase()
13
 
          if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
14
 
             {
15
 
                 var imgID = (img.id) ? "id='" + img.id + "' " : ""
16
 
                 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
17
 
                 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
18
 
                 var imgStyle = "display:inline-block;" + img.style.cssText 
19
 
                 var imgAttribs = img.attributes;
20
 
     var imgEvents = '';
21
 
                 for (var j=0; j<imgAttribs.length; j++)
22
 
                        {
23
 
        var imgAttrib = imgAttribs[j];
24
 
                        if (imgAttrib.nodeName == "align")
25
 
                           {              
26
 
                           if (imgAttrib.nodeValue == "left") imgStyle = "float:left;" + imgStyle
27
 
                           if (imgAttrib.nodeValue == "right") imgStyle = "float:right;" + imgStyle
28
 
                           }
29
 
      else if (imgAttrib.nodeName == "onclick")
30
 
        imgEvents += " onClick='" + imgAttrib.nodeValue + "'";
31
 
      else if (imgAttrib.nodeName == "onmouseover")
32
 
        imgEvents += " onMouseOver='" + imgAttrib.nodeValue+ "'";
33
 
      else if (imgAttrib.nodeName == "onmouseout")
34
 
        imgEvents += " onMouseOut='" + imgAttrib.nodeValue+ "'";
35
 
      }
36
 
                 var strNewHTML = "<span " + imgID + imgClass + imgTitle + imgEvents
37
 
                 strNewHTML += " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
38
 
             strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
39
 
                 strNewHTML += "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
40
 
                 img.outerHTML = strNewHTML
41
 
                 i = i-1
42
 
             }
43
 
      }
44
 
   }
45
 
 
46
 
onload = correctPNG;