Skip to content

Commit 3fec325

Browse files
committed
add support for URL parameters to set site type and username, closes #10
1 parent 858d286 commit 3fec325

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

js/App.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,18 @@ export default {
854854
if (savedForm.filters) {
855855
this.inputs.filters = savedForm.filters
856856
}
857+
858+
const params = new URLSearchParams(window.location.search)
859+
860+
const site = params.get('site')
861+
if (site === 'lichess' || site === 'chesscom') {
862+
this.inputs.type = site
863+
}
864+
865+
const username = params.get('username')
866+
if (username) {
867+
this.inputs.value = username
868+
}
857869
},
858870
859871
methods: {

0 commit comments

Comments
 (0)