modify online js to offline