add visual effect to current window and mapping for js function