Skip to content

Instantly share code, notes, and snippets.

@tkatochin
Created September 4, 2013 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkatochin/6435264 to your computer and use it in GitHub Desktop.
Save tkatochin/6435264 to your computer and use it in GitHub Desktop.
Googleアプリにスクリプトレットなどで流し込んで、マルチアカウントユーザーか否かを判断する
// to be loaded AddToStringPrototypeStartsWithAndEndsWith.js
isMultiLogoned = function () {
tags = document.getElementsByTagName("a");
for (var i = 0; i < tags.length; i++) {
if (tags[i].rel == "noreferrer") {
if (tags[i].href != "" && (tags[i].href.indexOf("&authUser=") || tags[i].href.indexOf("?authUser="))) {
return true;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment