Privacy policy for Account Switcher for YouTube
Account Switcher for YouTube by arand4
No build step, no minification and no third-party libraries: the uploaded zip is the exact source. Manifest V2, Firefox only.
What it does: adds entries to YouTube's 3-dots menu (content.js) and the right-click menu (background.js) that open a video in a new tab with ?authuser=N, or through YouTube's sign-in redirect with pageid for brand channels. The toolbar popup saves the account the page is currently using.
Things worth knowing:
- content.js reads window.wrappedJSObject.ytcfg (YouTube's page config) to get the session index, channel ID and Google account ID. It only reads.
- To read the account name, the popup asks content.js to open YouTube's own account menu (hidden), read the name, and close it. This simulates a click on the page's avatar button in the user's own session.
- Permissions: menus (context menu), storage (saved accounts, local only), downloads (only for the manual "Save to file..." button in settings), youtube.com (content script), .ggpht.com and .googleusercontent.com (download the profile picture when the user saves a channel; the only network request the extension makes).
- Nothing is sent anywhere. data_collection_permissions is "none". No remote code, no eval.
How to test: sign in to YouTube (ideally with two Google accounts in the same browser). On the home page, click the 3 dots on a video card; the extension's entries appear at the bottom of the menu. Until accounts are saved it shows placeholder entries "Account 1" and "Account 2" (login numbers 0 and 1). Click the toolbar button on a YouTube tab to save the current account. With only one Google account signed in, opening as the second one won't load a second account, which is expected.