added offline button javascript side