const names = [];
names.push("Scott Welsh from the United States") ;
names.push("Derrick Eastman from Canada") ;
names.push("Marcus Norcraff from the United States") ;
names.push("Lawrence Knell from the United States") ;
names.push("Carl Hartly from the UK") ;
names.push("Walt Hill from the United States") ;
names.push("Lorna Patton from Canada") ;
names.push("Marty Gentry from the United States") ;
names.push("Davis Hanoi from the United States") ;
names.push("Mikael Eleser from Denmark") ;
names.push("Todd Monefort from the UK") ;
names.push("Ken Roberts from the United States") ;
names.push("Brian Villa from Canada") ;
names.push("Richard Bryant from the United States") ;
names.push("Rob Moore from the Australia") ;
names.push("Frida Tran from the United States") ;
let bubble__wrapper = document.querySelector( '#bubble__wrapper' );
bubble__wrapper.innerHTML = "
"
let before__text = document.querySelector( '#before__text' );
let the__name = document.querySelector( '#the__name' );
let after__text = document.querySelector( '#after__text' );
let icon = document.querySelector( "#icon_path" );
icon.style.fill="#2010fe";
document.querySelector( "#bubble__circle" ).style.borderLeftColor="#2010fe"
after__text.innerHTML = 'Recently purchased Hedgehog Pro'
let i = 0;
let randomized = Math.ceil( Math.random() * names.length );
const rotation = setInterval(() => {
function shuffleArray( names ){
for (var x = names.length - 1; x > 0; x--) {
var j = Math.floor( Math.random() * ( x + 1 ) );
var temp = names[ x ];
names[ x ] = names[ j ];
names[ j ] = temp;
}
}
shuffleArray( names );
the__name.innerHTML = names[ i ];
bubble__wrapper.classList.add( 'open' );
setTimeout(() => {
bubble__wrapper.classList.remove( 'open' );
}, 4000 );
i++;
if( i >= names.length ){
clearInterval( rotation ) ;
}
}, 19000 );