Locked tabs which can only navigate to sub folders

Hi,

How are these scripts set up and used?

  1. Do I create two scripts?
  2. How do I initialize them?

Thanks