I was learning about some awesome coding tricks today, and was able to cook up a Chrome extension that will allow you to switch between your accounts on Scratch 2.0.
Once you download it, do this to add an account:
-Log in to one of your accounts
-Click the extension icon (currently just a green box)
-Your login data is recorded
Do that for as many accounts as you want. The program will keep track of all of them. When adding another account, be sure to click the log out button in the extension popup window, rather than on the Scratch site. If you click the button on the Scratch site, then the login data stored by the extension will become invalid.
To switch between accounts, simply click the icon and then click on the account you wish to log in to. Then, refresh any Scratch windows and they will be logged in as the user you selected.
To try it out, it is available right here. Note that due to the restraints of userscripts, I was not able to write one and had to write a dedicated Chrome extension instead.
Please try it out!
Offline
veggieman wrote:
Can you post the source code so I can know it's safe?
Clicky!
I can assure you it is safe. The link I have provided contains all of the code.
Offline
veggieman wrote:
Okay so the extension is there and the popup displays properly and stuff but it's not storing the accounts.
This probably has to do with the fact that your local storage has not been set the way mine has. I will learn about writing install scripts that will set it up for you, and get back to you. Since I am at a programming competition tomorrow, I probably won't have anything until Saturday or Sunday.
Offline
I have attempted a fix. It is at the same link. You need to keep the popup open for about 10 seconds the first time you open it after installing it before it completely saves your data.
Offline
Okay, cool, it works now. It's really cool!!
My only other problem is that the little popup saying "You now have to refresh all Scratch windows" appears partially off-screen, so I have to drag it over to close it. Maybe it could appear in the centre?
Offline
veggieman wrote:
Okay, cool, it works now. It's really cool!!
My only other problem is that the little popup saying "You now have to refresh all Scratch windows" appears partially off-screen, so I have to drag it over to close it. Maybe it could appear in the centre?
I have made a better version that now just refreshes the page for you. I'll upload it later.
Offline
jvvg wrote:
veggieman wrote:
Okay, cool, it works now. It's really cool!!
My only other problem is that the little popup saying "You now have to refresh all Scratch windows" appears partially off-screen, so I have to drag it over to close it. Maybe it could appear in the centre?I have made a better version that now just refreshes the page for you. I'll upload it later.
Alright, cool.
Offline
It won't download properly as it's not on the chrome web store. Can you put it there too?
Offline
SuperJedi224 wrote:
It won't download properly as it's not on the chrome web store. Can you put it there too?
I was having a few issues with the store rejecting manifest.json, but I will try again later.
Offline
It is now on the Chrome Web Store!
Here's the link
Credit to LS97 for the CSS!
Last edited by jvvg (2013-05-05 14:00:35)
Offline