From: Steinar H. Gunderson Date: Thu, 19 Nov 2015 18:58:04 +0000 (+0100) Subject: Remove more obsolete browser hacks. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=65f5fecb38c25db9114828e82773c682eba0f186;hp=c9ca08bc294eea3dc22474c69ec4bea8c8913907;p=pr0n Remove more obsolete browser hacks. --- diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index 7e7ccf4..bedaeb1 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -218,35 +218,7 @@ function can_go_previous() function set_opacity(id, amount) { var elem = document.getElementById(id); - if (typeof(elem.style.opacity) != 'undefined') { // W3C - elem.style.opacity = amount; - } else if (typeof(elem.style.mozOpacity) != 'undefined') { // older Mozilla - elem.style.mozOpacity = amount; - } else if (typeof(elem.style.filter) != 'undefined') { // IE - if (elem.style.filter.indexOf("alpha") == -1) { - // add an alpha filter if there isn't one already - if (elem.style.filter) { - elem.style.filter += " "; - } else { - elem.style.filter = ""; - } - elem.style.filter += "alpha(opacity=" + (amount*100.0) + ")"; - } else { - // ugh? this seems to break in color index mode... - if (typeof(elem.filters) == 'unknown') { - elem.style.filter = "alpha(opacity=" + (amount*100.0) + ")"; - } else { - elem.filters.alpha.opacity = (amount * 100.0); - } - } - } else { // no alpha support - if (amount > 0.5) { - elem.style.visibility = "visible"; - elem.style.zorder = 1; - } else { - elem.style.visibility = "hidden"; - } - } + elem.style.opacity = amount; } function center_image(num)