11 lines
289 B
JavaScript
11 lines
289 B
JavaScript
function selectTagByUrlQuery(){
|
|
query = new URLSearchParams(window.location.search);
|
|
tag = query.get('tag');
|
|
|
|
if(tag){
|
|
document.querySelector(`#tag-selector-${tag}`).checked = true;
|
|
}
|
|
}
|
|
|
|
document.addEventListener('load', selectTagByUrlQuery);
|
|
selectTagByUrlQuery(); |