aboutsummaryrefslogtreecommitdiff
path: root/vendors/dokuwiki/lib/plugins/s5reloaded/ui/thesis/iepngfix.htc
diff options
context:
space:
mode:
authorsembrestels <sembrestels@riseup.net>2011-10-13 15:23:11 +0200
committersembrestels <sembrestels@riseup.net>2011-10-13 15:23:11 +0200
commit74bd6999c5e5c23ebbf90dbb6bdaabbddd7594cf (patch)
tree834c120d692be288f261bcae169eedd3d6b31d74 /vendors/dokuwiki/lib/plugins/s5reloaded/ui/thesis/iepngfix.htc
parentf8be8643f0faadb2c0ce87d553b7b9d569af5afd (diff)
downloadelgg-74bd6999c5e5c23ebbf90dbb6bdaabbddd7594cf.tar.gz
elgg-74bd6999c5e5c23ebbf90dbb6bdaabbddd7594cf.tar.bz2
Rename lib/dokuwiki to vendors/dokuwiki
Diffstat (limited to 'vendors/dokuwiki/lib/plugins/s5reloaded/ui/thesis/iepngfix.htc')
-rwxr-xr-xvendors/dokuwiki/lib/plugins/s5reloaded/ui/thesis/iepngfix.htc42
1 files changed, 42 insertions, 0 deletions
diff --git a/vendors/dokuwiki/lib/plugins/s5reloaded/ui/thesis/iepngfix.htc b/vendors/dokuwiki/lib/plugins/s5reloaded/ui/thesis/iepngfix.htc
new file mode 100755
index 000000000..bba2db756
--- /dev/null
+++ b/vendors/dokuwiki/lib/plugins/s5reloaded/ui/thesis/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