Skip to content

Instantly share code, notes, and snippets.

@y-mamanaranu
Created December 7, 2022 01:18
Show Gist options
  • Select an option

  • Save y-mamanaranu/260d03fd941d7f3cf6c39d5ab1e7d59b to your computer and use it in GitHub Desktop.

Select an option

Save y-mamanaranu/260d03fd941d7f3cf6c39d5ab1e7d59b to your computer and use it in GitHub Desktop.
Switch goolgle account from Bookmark
javascript:(function(){
const maxAuthuser = 3;
var url = document.location;
const params = new URLSearchParams(url.search);
var authuser = params.get('authuser');
if (authuser == null) {
authuser = 0
};
authuser = (authuser + 1) % maxAuthuser;
params.set('authuser', authuser);
url.search = params.toString(); void(0);
})()
@y-mamanaranu
Copy link
Copy Markdown
Author

複数のGoogleアカウントにログインしている場合、
Bookmarkからこのスクリプトを実行すると、
Googleアカウントが切り替わります。

2行目にある下記の部分の数字をログインしているGoogleアカウントの数に変更して使用してください。
デフォルトは3です。

javascript const maxAuthuser = 3;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment