summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2014-02-03 12:44:28 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2014-02-03 12:44:28 -0500
commitd6619a14eef1d721a13e3f0220ffd324e6c39315 (patch)
tree6eddba53ee27ce40d2ecccf8b8d776ba0d921d97
parent48bd9fdd32a04e198c6ca2329ebe68760e0ec431 (diff)
downloadhtml5ks-d6619a14eef1d721a13e3f0220ffd324e6c39315.tar.xz
html5ks-d6619a14eef1d721a13e3f0220ffd324e6c39315.zip
className -> classList
-rw-r--r--www/js/html5ks.js6
-rw-r--r--www/js/menu.js8
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);
},