Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.