Save current state (unmerged, broken, not working...)
[vchess.git] / public / javascripts / components / rules.js
index d8aaa0f..02d3a0c 100644 (file)
@@ -10,7 +10,7 @@ Vue.component('my-rules', {
        `,
        mounted: function() {
                // AJAX request to get rules content (plain text, HTML)
-               ajax("/rules/" + variant, "GET", response => {
+               ajax("/rules/" + variant.name, "GET", response => {
                        let replaceByDiag = (match, p1, p2) => {
                                const args = this.parseFen(p2);
                                return getDiagram(args);
@@ -25,6 +25,7 @@ Vue.component('my-rules', {
                                position: fenParts[0],
                                marks: fenParts[1],
                                orientation: fenParts[2],
+                               shadow: fenParts[3],
                        };
                },
        },