From d6619a14eef1d721a13e3f0220ffd324e6c39315 Mon Sep 17 00:00:00 2001 From: Alex Xu Date: Mon, 3 Feb 2014 12:44:28 -0500 Subject: className -> classList --- www/js/html5ks.js | 6 ------ www/js/menu.js | 8 ++------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/www/js/html5ks.js b/www/js/html5ks.js index ab5fcd4..6d620b7 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -95,18 +95,12 @@ window.html5ks = { container.style.webkitTransform = "scale(" + newScale + ")"; container.style.mozTransform = "scale(" + newScale + ")"; container.style.transform = "scale(" + newScale + ")"; - if (container.className.indexOf("scale") === -1) { - container.className += " scale"; - } var applyScale = function (el, scale) { el.style.height = scale * 600 + "px"; el.style.marginTop = "-" + scale * 300 + "px"; el.style.width = scale * 800 + "px"; el.style.marginLeft = "-" + scale * 400 + "px"; - if (el.className.indexOf("scale") === -1) { - el.className += " scale"; - } }; if (html5ks.persistent.scaleVideo) { diff --git a/www/js/menu.js b/www/js/menu.js index bf0b52c..bcbb039 100644 --- a/www/js/menu.js +++ b/www/js/menu.js @@ -88,7 +88,7 @@ if (navigator.userAgent.indexOf(ua) > -1) { var quit = document.getElementsByClassName("quit"); for (var i = quit.length - 1; i >= 0; i--) { - quit[i].className = quit[i].className.replace("disabled", ""); + quit[i].classList.remove("disabled"); quit[i].addEventListener("click", close, false); } return false; @@ -143,10 +143,6 @@ var options = document.getElementsByClassName("option"), values = html5ks.persistent; - if (!html5ks.persistent.scaleAll) { - document.getElementById("scaleVideo").parentNode.className += " disabled"; - } - for (var i = options.length - 1; i >= 0; i--) { var option = options[i]; switch (option.type) { @@ -174,7 +170,7 @@ this.elements.mainMenu.style.display = "none"; html5ks.imachine.start().then(this.mainMenu.bind(this), console.error); }.bind(this), false); - start.className = start.className.replace("disabled", ""); + start.classList.remove("disabled"); }.bind(this), console.error); }, -- cgit v1.2.3-70-g09d2