Script worked fine as long as i had not change resolution of the browser screen (ctrl + m.wheel up\down ). As far as i did it, it pinned X coordinate of text inWindow, so when trying to replace the window i have text do not moving left/right. Page reload was of little help, it looks to work with initial resolution only.
Thanks.
UPD:
Tab script has same behaviour.