Merged in bugfix/MAPG-138-fix-js-minifying (pull request #111)
MAPG-138 use traditional for loop for compatibility
This commit is contained in:
commit
142c91f36b
@ -43,15 +43,16 @@ var MapGuesser = {
|
|||||||
var buttons = document.getElementById('modalButtons');
|
var buttons = document.getElementById('modalButtons');
|
||||||
buttons.textContent = '';
|
buttons.textContent = '';
|
||||||
|
|
||||||
for (extraButton of extraButtons) {
|
for (var i = 0; i < extraButtons.length; i++) {
|
||||||
|
var extraButton = extraButtons[i];
|
||||||
var button = document.createElement(extraButton.type);
|
var button = document.createElement(extraButton.type);
|
||||||
|
|
||||||
if (extraButton.type === 'a') {
|
if (extraButton.type === 'a') {
|
||||||
button.classList.add('button');
|
button.classList.add('button');
|
||||||
}
|
}
|
||||||
|
|
||||||
for (className of extraButton.classNames) {
|
for (var i = 0; i < extraButton.classNames.length; i++) {
|
||||||
button.classList.add(className);
|
button.classList.add(extraButton.classNames[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
button.classList.add('marginTop');
|
button.classList.add('marginTop');
|
||||||
@ -82,8 +83,8 @@ var MapGuesser = {
|
|||||||
hideModal: function () {
|
hideModal: function () {
|
||||||
var modals = document.getElementsByClassName('modal');
|
var modals = document.getElementsByClassName('modal');
|
||||||
|
|
||||||
for (modal of modals) {
|
for (var i = 0; i < modals.length; i++) {
|
||||||
modal.style.visibility = 'hidden';
|
modals[i].style.visibility = 'hidden';
|
||||||
}
|
}
|
||||||
|
|
||||||
document.getElementById('cover').style.visibility = 'hidden';
|
document.getElementById('cover').style.visibility = 'hidden';
|
||||||
|
Loading…
Reference in New Issue
Block a user