<div id="marketplace"><link href="https://fonts.googleapis.com/css?family=Montserrat:200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,&display=swap&subset=cyrillic" rel="stylesheet"/>
<link rel="stylesheet" href="https://goods.dobro.market/css/normalize.css"/>
<link rel="stylesheet" href="https://goods.dobro.market/build/bundle.css"/>
<input type="hidden" id="template" value="dobromarket"/>
<script src="https://goods.dobro.market/build/bundle.js"></script>
</div>
<div id="marketplace"><link href="https://fonts.googleapis.com/css?family=Montserrat:200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,&display=swap&subset=cyrillic" rel="stylesheet"/>
<link rel="stylesheet" href="https://goods.dobro.market/css/normalize.css"/>
<link rel="stylesheet" href="https://goods.dobro.market/build/bundle.css"/>
<input type="hidden" id="categories" value="Гардероб,Шпильки невидимки,Сумки,Платья,Спортивные костюмы" />
<input type="hidden" id="template" value="dobromarket"/>
<script src="https://goods.dobro.market/build/bundle.js"></script>
</div>
<div id="marketplace">
<link href="https://fonts.googleapis.com/css?family=Montserrat:200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,&display=swap&subset=cyrillic" rel="stylesheet"/>
<link rel="stylesheet" href="https://goods.dobro.market/css/normalize.css"/>
<link rel="stylesheet" href="https://goods.dobro.market/build/bundle.css"/>
<input type="hidden" id="projects" value="886" />
<input type="hidden" id="template" value="dobromarket"/>
<script src="https://goods.dobro.market/build/bundle.js"></script>
</div>
<div id="marketplace">
<link href="https://fonts.googleapis.com/css?family=El+Messiri:200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,&display=swap&subset=cyrillic" rel="stylesheet"/>
<link rel="stylesheet" href="https://goods.dobro.market/css/normalize.css"/>
<link rel="stylesheet" href="https://goods.dobro.market/build/bundle.css"/>
<input type="hidden" id="template" value="yarmonka"/>
<script src="https://goods.dobro.market/build/bundle.js"></script>
<script>
function getQueryParamsAsObject(searchString) {
return searchString
.split('&')
.reduce((prev, curr) => {
let p = curr.split('=')
prev[decodeURIComponent(p[0])] = decodeURIComponent(p[1])
return prev
}, {})
}
function createHiddenInput(params, name, value) {
if (document.getElementById(name)) {
return;
}
if (params && params[value] && params[value].length > 0) {
const hiddenInput = document.createElement('input');
hiddenInput.setAttribute('type', 'hidden');
hiddenInput.setAttribute('id', name);
hiddenInput.setAttribute('name', name);
hiddenInput.setAttribute('value', params[value]);
document.getElementById('marketplace').appendChild(hiddenInput);
}
}
const rawString = window.location.search.slice(1);
const urlParams = getQueryParamsAsObject(decodeURIComponent(rawString));
createHiddenInput(urlParams, 'projects', 'projectId');
createHiddenInput(urlParams, 'categories', 'categoryName');
createHiddenInput(urlParams, 'search', 'search');
</script>
</div>