[Cleanup] Factoring some duplicate code in navigate.js
[Fix] fix an error in the manifest