Merge remote-tracking branch 'origin/master' into gh-pages
This commit is contained in:
commit
ac65928e32
26
index.html
26
index.html
|
@ -371,25 +371,17 @@
|
|||
|
||||
function refreshMineCounts() {
|
||||
$('li.revealed:not(.mine)').each(function() {
|
||||
$(this).text(
|
||||
$(this).countMinesText()
|
||||
);
|
||||
var mineCount = $(this).countMinesText();
|
||||
|
||||
$(this).text(mineCount);
|
||||
|
||||
//remove "mines1" etc
|
||||
|
||||
var mine = $(this).hasClass("mine");
|
||||
|
||||
$(this).removeAttr("class");
|
||||
|
||||
if (mine) {
|
||||
$(this).addClass("mine");
|
||||
} else {
|
||||
$(this).addClass(
|
||||
"mines" + $(this).countMinesText()
|
||||
);
|
||||
}
|
||||
|
||||
$(this).addClass("revealed");
|
||||
$(this).attr(
|
||||
'class',
|
||||
$(this).attr('class').replace(
|
||||
/mines[0-9]/, "mines" + mineCount
|
||||
)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue