make preview work without JS