Mercurial > repos > shellac > sam_consensus_v3
view env/lib/python3.9/site-packages/docutils/writers/s5_html/themes/default/iepngfix.htc @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
line wrap: on
line source
<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>