Sha256: 4a72ddbff709374e96ce2d5bd141d89ad6c931650b498ebbdbf1ea842e5cc3e9

Contents?: true

Size: 1.2 KB

Versions: 41

Compression:

Stored size: 1.2 KB

Contents

<public:component>
<public:attach event="onpropertychange" onevent="doFix()" />

<script>

// IE5.5+ PNG Alpha Fix v1.0 by Angus Turnbull http://www.twinhelix.com
// Free usage permitted as long as this notice remains intact.

// This must be a path to a blank image. That's all the configuration you need here.
var blankImg = 'ui/default/blank.gif';

var f = 'DXImageTransform.Microsoft.AlphaImageLoader';

function filt(s, m) {
 if (filters[f]) {
  filters[f].enabled = s ? true : false;
  if (s) with (filters[f]) { src = s; sizingMethod = m }
 } else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
}

function doFix() {
 if ((parseFloat(navigator.userAgent.match(/MSIE (\S+)/)[1]) < 5.5) ||
  (event && !/(background|src)/.test(event.propertyName))) return;

 if (tagName == 'IMG') {
  if ((/\.png$/i).test(src)) {
   filt(src, 'image');  // was 'scale'
   src = blankImg;
  } else if (src.indexOf(blankImg) < 0) filt();
 } else if (style.backgroundImage) {
  if (style.backgroundImage.match(/^url[("']+(.*\.png)[)"']+$/i)) {
   var s = RegExp.$1;
   style.backgroundImage = '';
   filt(s, 'crop');
  } else filt();
 }
}

doFix();

</script>
</public:component>

Version data entries

41 entries across 39 versions & 17 rubygems

Version Path
dyndoc-ruby-0.3.0 share/etc/pandoc/extra/s5-ui/default/iepngfix.htc
Shazburg-webby-0.9.0 examples/presentation/content/presentation/s5/iepngfix.htc
TwP-webby-0.9.0 examples/presentation/content/presentation/s5/iepngfix.htc
TwP-webby-0.9.1 examples/presentation/content/presentation/s5/iepngfix.htc
TwP-webby-0.9.2 examples/presentation/content/presentation/s5/iepngfix.htc
TwP-webby-0.9.3 examples/presentation/content/presentation/s5/iepngfix.htc
TwP-webby-0.9.4.1 examples/presentation/content/presentation/s5/iepngfix.htc
TwP-webby-0.9.4 examples/presentation/content/presentation/s5/iepngfix.htc
blowmage-webby-0.9.4.1 examples/presentation/content/presentation/s5/iepngfix.htc
brandon-codex-1.0.3 app_generators/codex/templates/ui/default/iepngfix.htc
drnic-codex-1.0.0 app_generators/codex/templates/ui/default/iepngfix.htc
drnic-codex-1.0.1 app_generators/codex/templates/ui/default/iepngfix.htc
drnic-codex-1.0.2 app_generators/codex/templates/ui/default/iepngfix.htc
dysinger-webby-0.9.4 examples/presentation/content/presentation/s5/iepngfix.htc
francois-webby-0.9.4.1 examples/presentation/content/presentation/s5/iepngfix.htc
giraffesoft-webby-0.9.5 examples/presentation/content/presentation/s5/iepngfix.htc
mikker-webby-0.9.4 examples/presentation/content/presentation/s5/iepngfix.htc
pragdave-codex-1.0.3 app_generators/codex/templates/ui/default/iepngfix.htc
tobias-codex-1.0.3 app_generators/codex/templates/ui/default/iepngfix.htc
jamesgolick-webby-0.9.5 examples/presentation/content/presentation/s5/iepngfix.htc