Improved javascript feed

Fixed: feed restarted if the end was reached.