Skip to content

Instantly share code, notes, and snippets.

@petitJAM
Created December 14, 2021 16:33
Show Gist options
  • Save petitJAM/2fb5111474508797dbcd39f33ebd0693 to your computer and use it in GitHub Desktop.
Save petitJAM/2fb5111474508797dbcd39f33ebd0693 to your computer and use it in GitHub Desktop.
Containerize Bookmark

Source: mozilla/multi-account-containers#854 (comment)

  1. Install this extension it requires no permissions.
  2. Open bookmark manager Library -> Bookmarks > All Bookmarks
  3. Create a bookmarklet by clicking Organize -> New Bookmark,
  4. Name: Containerize a Bookmark
  5. Location:
    javascript:(function(c,u){c&&(c=c.trim())&&(u=prompt('URL?',location))&&(u=u.trim())&&prompt('Contained URL to copy and bookmark:','ext+container:name='+encodeURIComponent(c)+'&url='+encodeURIComponent(u))})(prompt('Container name?','Personal'))
    
  6. Put it somewhere accessible - for example at the top of the list in Ctrl+B Bookmarks Bar - you can't launch a bookmarklet by searching for it in the address bar.
  7. Go to the site you want to run in a specific container.
  8. Click the "Containerize a Bookmark", pick the container name and copy the link.
  9. Create or edit some existing bookmark to set it to this link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment