diff options
Diffstat (limited to 'assets/web.js')
-rw-r--r-- | assets/web.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/assets/web.js b/assets/web.js index 7b9bce5..3801335 100644 --- a/assets/web.js +++ b/assets/web.js @@ -52,5 +52,14 @@ const web = new Vue({ } this.timer = setTimeout(this.searchWord, 800); } + }, + mounted: function() { + const param = window.location.search.substr(1); + + param.split('&').forEach( p => { + if (p.startsWith('w=')) { + this.word = p.slice(2); + } + }); } }); |