]> git.sesse.net Git - remoteglot/blobdiff - www/js/remoteglot.js
Better imbalance pieces in dark mode.
[remoteglot] / www / js / remoteglot.js
index dc0e6307cce2f1e61f341f105e215bf73eb84b9a..3a95204e20bc7692a38d2fb3fdc36ed5b7e61eab 100644 (file)
@@ -1751,10 +1751,12 @@ var update_imbalance = function(fen) {
        var black_imbalance = '';
        for (var piece in imbalance) {
                for (var i = 0; i < imbalance[piece]; ++i) {
-                       white_imbalance += '<img src="' + svg_pieces['w' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;">';
+                       white_imbalance += '<img src="' + svg_pieces['w' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;" class="imbalance-piece">';
+                       white_imbalance += '<img src="' + svg_pieces['b' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;" class="imbalance-inverted-piece">';
                }
                for (var i = 0; i < -imbalance[piece]; ++i) {
-                       black_imbalance += '<img src="' + svg_pieces['b' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;">';
+                       black_imbalance += '<img src="' + svg_pieces['b' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;" class="imbalance-piece">';
+                       black_imbalance += '<img src="' + svg_pieces['w' + piece.toUpperCase()] + '" alt="" style="width: 15px;height: 15px;" class="imbalance-inverted-piece">';
                }
        }
        $('#whiteimbalance').html(white_imbalance);