diff options
| author | Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com> | 2019-04-20 15:56:25 -0400 |
|---|---|---|
| committer | Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com> | 2019-04-20 15:56:25 -0400 |
| commit | 7a42fbbda333626bd0accae1ff077fe7f4e92ab6 (patch) | |
| tree | 12e5b2fc23b0bfea42bea574ed68f11eac3b8913 /bsdcan2019/ui/default/iepngfix.htc | |
| parent | 025f5cfbcdfd35fc1518152f8ad2d0ed108b7037 (diff) | |
| download | presentations-7a42fbbda333626bd0accae1ff077fe7f4e92ab6.tar.gz presentations-7a42fbbda333626bd0accae1ff077fe7f4e92ab6.zip | |
Initial commit of a blank s5 presntation for bsdcan 2019
Diffstat (limited to 'bsdcan2019/ui/default/iepngfix.htc')
| -rw-r--r-- | bsdcan2019/ui/default/iepngfix.htc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/bsdcan2019/ui/default/iepngfix.htc b/bsdcan2019/ui/default/iepngfix.htc new file mode 100644 index 0000000..bba2db7 --- /dev/null +++ b/bsdcan2019/ui/default/iepngfix.htc @@ -0,0 +1,42 @@ +<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>
\ No newline at end of file |
