From 65f5fecb38c25db9114828e82773c682eba0f186 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Thu, 19 Nov 2015 19:58:04 +0100 Subject: [PATCH] Remove more obsolete browser hacks. --- files/pr0n-fullscreen.js | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) 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) -- 2.39.2