fixed scrollbar detection
combine same functions for link and folder into one object