<script>
document.addEventListener("DOMContentLoaded", function() {
let tail = location.search;
let mark, model, yearIssue;
if(tail!=''){
tail = tail.split('&');
for(key in tail){
let nameOption = tail[key].split('=')[0];
option = tail[key].split('=')[1];
if( nameOption.includes("mark") ) mark = option;
if( nameOption.includes("model") ) model = option;
if( nameOption.includes("year-issue") ) yearIssue = option;
if( nameOption.includes("vin") ){
let elem = document.querySelectorAll('.vin .tn-atom');
elem.forEach(element => element.textContent = option);
};
};
let finalText = `(${mark} ${model} ${yearIssue} г.в.)`;
let elem = document.querySelectorAll('.mark .tn-atom');
elem.forEach(element => element.textContent = finalText);
};
});
</script>