Large

Reddit - account switcher

By ashleyw Last update Jul 13, 2010 — Installed 4,654 times.

Suggestion/tip

in
Subscribe to Suggestion/tip 1 post, 1 voice

SeanCarrboro User
FirefoxX11

Hi, thanks for the script.

My browsing style is to open lots of tabs in the background and then work my way through them. That causes the following problem with this script:

1. As User1, open 2 tabs. Their Account Switcher dropdowns will all say "User1".

2. While reading Tab 1, Account-switch to User2. Close Tab 1.

3. Now you're on Tab 2, it says you're logged in as User1, but you're really logged in as User2, so you can't choose User1. To post as User1 you have to choose User2 and then *back* to User1.

Solution: changing this line:

$("#user_switch").change(function(el){

to:

$("#user_switch option").click(function(el){

allows you to log in as any user, even if the page thinks you're already logged in as that user.

It works for me, and I thought others might like this method as well.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel