javascript - 我如何去特定用户的电子邮件收件箱或谷歌日历和所有其他谷歌应用程序
问题描述
这是我的代码。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script src="script.js"></script>
<a href="https://mail.google.com" target="_blank">go email</a>
<br><br>
<a href="https://calendar.google.com/" target="_blank">go calendar</a>
</body>
</html>
但是当我点击两个链接时,服务器会在默认电子邮件收件箱和谷歌日历(在我的浏览器中设置)上重定向我。而且我在我的 chrome 浏览器中有多个用户登录。所以我想去特定的用户电子邮件地址。
我的问题是我怎样才能去特定用户的电子邮件或日历。
提前致谢。
解决方案
当您更改帐户时,您可以看到 google 也更改了 url 中的一部分。
例如:
https://calendar.google.com/calendar/u/0/r
更改为
https://calendar.google.com/calendar/u/1/r
ID ( 0
, 1
) 似乎是您登录的顺序。
我尝试了当您用电子邮件替换此 ID 时会发生什么。它似乎有效。
https://calendar.google.com/calendar/u/me@gmail.com
为用户打开日历me@gmail.com
。
注意:我没有找到任何官方文档等描述这一点。所以也许这对你有用。当然,谷歌可以随时更改此设置。我不会依赖它,也不会在生产中使用它。
推荐阅读
- c - C得到未知的输入长度
- python - 如何修复 AttributeError:部分初始化的模块(Visual Studio 2019)
- azure - Azure API 无法识别来自 Terraform 的服务主体
- laravel - 如何按另一个表列对 Laravel 雄辩的结果进行排序
- sql - SQL 函数参数默认为 select
- javascript - 是否可以删除某种类型的子元素?
- linux - 如何找到谁调用了我的 bash 应用程序
- android - Jetpack 撰写“文本”功能已弃用 (1.0.0-alpha09)
- typescript - 问题设置 DataSet 的 fieldId 选项
- alpine.js - Alpine.js show/hide image for a image selector