JavaScript realize priterest