document.addEventListener('DOMContentLoaded', () => {
const link = document.querySelector('#phone');
let activeIndex = 0;
const numbers = ['+38 (095) 123 45 67', '+38 (098) 123 45 67', '+38 (111) 111 11 11'];
setNumber(numbers[activeIndex]);
setInterval(() => {
setNumber(numbers[activeIndex]);
activeIndex = (activeIndex + 1) % numbers.length;
}, 2000);
function setNumber(number) {
link.innerText = number;
link.setAttribute('href', 'tel:' + number);
}
});
const json = `{"57939553_675562008": {
"price": "5.00",
"market_hash_name": "Beast-Jaw Bludgeoner",
"ru_rarity": "Common"
}}`;
const data = JSON.parse(json);
data['57939553_675562008'].custom_hash_name = data['57939553_675562008'].market_hash_name;
delete data['57939553_675562008'].market_hash_name;
const result = JSON.stringify(data);
console.log(result);
const data = JSON.parse(json);
delete Object.assign(data, {
'57939553_675562008': {
new_name: data['57939553_675562008'].market_hash_name,
...data['57939553_675562008']
}
})['57939553_675562008']['market_hash_name'];
$('.sh_nmr').textToggle(".sh_nmr","").click();
$('.sh_nmr').textToggle(".num_hide","ХХХ").click();
$('.click_number_header').on("click" , () => ga('send', 'event', 'click_number_header', 'click', 'Click number header'));