diff --git a/simon987/src/components/HelloWorld.vue b/simon987/src/components/HelloWorld.vue index e3a390a..b1a5017 100644 --- a/simon987/src/components/HelloWorld.vue +++ b/simon987/src/components/HelloWorld.vue @@ -8,8 +8,11 @@ import Grid from '../Grid'; window.onload = () => { + const urlParams = new URLSearchParams(window.location.search); + const size = urlParams.get('size'); + let grid = new Grid( - window.innerWidth < 1000 ? 20 : 30, + size ? size : window.innerWidth < 1000 ? 20 : 30, window.innerWidth < 1000 ? 80 : 40, ); grid.setup();