Nhúng bàn cờ vào web của bạn
Dán đoạn mã dưới đây vào nơi bạn muốn hiện bàn cờ (trang HTML, hoặc khối "HTML tùy chỉnh" của WordPress, Blogger, Wix...). Khung tự cao theo nội dung. Người chơi muốn lưu tên và xem bảng xếp hạng sẽ bấm link ở cuối bàn để sang MateMoves.
Cờ tướng
<iframe src="https://matemoves.com/nhung/co-tuong/" title="Cờ tướng với máy" allow="fullscreen" style="width:100%;border:0;height:640px" loading="lazy"></iframe>
<script>
addEventListener("message", (e) => {
if (e.origin !== "https://matemoves.com" || !e.data?.choicoCao) return;
for (const f of document.querySelectorAll("iframe")) if (f.contentWindow === e.source) f.style.height = e.data.choicoCao + "px";
});
</script>Xem trước
Cờ úp
<iframe src="https://matemoves.com/nhung/co-up/" title="Cờ úp với máy" allow="fullscreen" style="width:100%;border:0;height:640px" loading="lazy"></iframe>
<script>
addEventListener("message", (e) => {
if (e.origin !== "https://matemoves.com" || !e.data?.choicoCao) return;
for (const f of document.querySelectorAll("iframe")) if (f.contentWindow === e.source) f.style.height = e.data.choicoCao + "px";
});
</script>Xem trước
Cờ vua
<iframe src="https://matemoves.com/nhung/co-vua/" title="Cờ vua với máy" allow="fullscreen" style="width:100%;border:0;height:640px" loading="lazy"></iframe>
<script>
addEventListener("message", (e) => {
if (e.origin !== "https://matemoves.com" || !e.data?.choicoCao) return;
for (const f of document.querySelectorAll("iframe")) if (f.contentWindow === e.source) f.style.height = e.data.choicoCao + "px";
});
</script>Xem trước
Cờ caro
<iframe src="https://matemoves.com/nhung/caro/" title="Cờ caro với máy" allow="fullscreen" style="width:100%;border:0;height:640px" loading="lazy"></iframe>
<script>
addEventListener("message", (e) => {
if (e.origin !== "https://matemoves.com" || !e.data?.choicoCao) return;
for (const f of document.querySelectorAll("iframe")) if (f.contentWindow === e.source) f.style.height = e.data.choicoCao + "px";
});
</script>Xem trước
Ô ăn quan
<iframe src="https://matemoves.com/nhung/o-an-quan/" title="Ô ăn quan với máy" allow="fullscreen" style="width:100%;border:0;height:640px" loading="lazy"></iframe>
<script>
addEventListener("message", (e) => {
if (e.origin !== "https://matemoves.com" || !e.data?.choicoCao) return;
for (const f of document.querySelectorAll("iframe")) if (f.contentWindow === e.source) f.style.height = e.data.choicoCao + "px";
});
</script>Xem trước
Cờ vây
<iframe src="https://matemoves.com/nhung/co-vay/" title="Cờ vây với máy" allow="fullscreen" style="width:100%;border:0;height:640px" loading="lazy"></iframe>
<script>
addEventListener("message", (e) => {
if (e.origin !== "https://matemoves.com" || !e.data?.choicoCao) return;
for (const f of document.querySelectorAll("iframe")) if (f.contentWindow === e.source) f.style.height = e.data.choicoCao + "px";
});
</script>Xem trước
Cờ vây 13x13
<iframe src="https://matemoves.com/nhung/co-vay/13/" title="Cờ vây 13x13 với máy" allow="fullscreen" style="width:100%;border:0;height:640px" loading="lazy"></iframe>
<script>
addEventListener("message", (e) => {
if (e.origin !== "https://matemoves.com" || !e.data?.choicoCao) return;
for (const f of document.querySelectorAll("iframe")) if (f.contentWindow === e.source) f.style.height = e.data.choicoCao + "px";
});
</script>Xem trước
Cờ vây 19x19
<iframe src="https://matemoves.com/nhung/co-vay/19/" title="Cờ vây 19x19 với máy" allow="fullscreen" style="width:100%;border:0;height:640px" loading="lazy"></iframe>
<script>
addEventListener("message", (e) => {
if (e.origin !== "https://matemoves.com" || !e.data?.choicoCao) return;
for (const f of document.querySelectorAll("iframe")) if (f.contentWindow === e.source) f.style.height = e.data.choicoCao + "px";
});
</script>