par*_*oid 82 google-chrome notifications
我从多个网站收到 Chrome 通知,当我什至没有为这些网站打开任何标签时,它们就可以工作。
但有时我不在办公桌前或不在看笔记本电脑时会收到这些 Chrome 通知。
由于其中一些通知对我有用,我希望能够访问我错过的任何通知。
有没有办法查看通知历史记录?
Esd*_*pez 36
如果您有 Mac,那就有办法了!
通知列表如下所示:
您所要做的就是:
1. 在 chrome 中,转到:
chrome://flags/
Run Code Online (Sandbox Code Playgroud)
2. 寻找:
Enable native notifications. Mac
Run Code Online (Sandbox Code Playgroud)
3.启用,重启chrome,大功告成。享受!
编辑:
从 Chrome 59 开始,通过 Notifications API 或 chrome.notifications 扩展 API 发送的通知将直接由 macOS 原生通知系统而不是 Chrome 自己的系统显示。[来源]
小智 26
在 MacOSX 上,您将拥有位于 Library/Application Support 中的 Chrome 目录。打开终端应用程序并运行以下命令:
cd ~/Library/Application\ Support/Google/Chrome/Default/Platform\ Notifications/
ls -la
Run Code Online (Sandbox Code Playgroud)
在 Gnu/Linux(至少在 Linux Mint 上),类似地,您可以在/home/user/.config/google-chrome/Profile 1/Platform Notifications/
– jdmayfield 中找到日志文件
现在你会看到这样的文件:
drwx------@ 7 visi staff 224 Jul 13 18:16 .
drwx------ 75 visi staff 2400 Jul 15 11:05 ..
-rw-------@ 1 visi staff 759 Jul 15 10:57 000003.log
-rw-------@ 1 visi staff 16 Jul 13 18:16 CURRENT
-rw-------@ 1 visi staff 0 Jul 13 18:16 LOCK
-rw-------@ 1 visi staff 147 Jul 13 18:16 LOG
-rw-------@ 1 visi staff 41 Jul 13 18:16 MANIFEST-000001
Run Code Online (Sandbox Code Playgroud)
你可以看到最近的一个是 000003.log,所以通过下一个命令检查它:
tail -n 100 000003.log
Run Code Online (Sandbox Code Playgroud)
您将看到此日志中的最后 100 个项目。然后您可以打开 Chrome 设置并禁用该网站通知。
请注意,如果您在 chrome 中有多个配置文件,则您的路径可能会有所不同,如下所示(Profile1 而不是 Default):
cd ~/Library/Application\ Support/Google/Chrome/Profile\ 1/Platform\ Notifications/
Run Code Online (Sandbox Code Playgroud)
小智 14
如果您使用的是 MS-Windows,请转到%LocalAppData%\Google\Chrome\User Data\Default\Platform Notifications
,那里有过去通知的日志文件。
对于 Ubuntu,请跳到底部的“最后一句话”TL;DR 答案。
\n这是根据@Andrey Bezpalenko\'s 答案建模的,但经过测试也可以在 Ubuntu 18.04 上运行。
\n然而,正如他的答案一样,输出非常难看,因为它是二进制输出,可读的 ASCII 字符串与二进制文件混合在一起。步骤如下:
\n在 Chrome 安装的“平台通知”目录中找到最新的日志文件 (*.log):
\n find ~ | grep --extended-regexp "google-chrome.{0,30}Platform Notifications.*\\.log$" | tail -n 1\n
Run Code Online (Sandbox Code Playgroud)\n示例输出:
\n $ find ~ | grep --extended-regexp "google-chrome.{0,30}Platform Notifications.*\\.log$" | tail -n 1\n find: \xe2\x80\x98/home/gabriel/.cache/doc\xe2\x80\x99: Permission denied\n /home/gabriel/.config/google-chrome/Default/Platform Notifications/000003.log\n
Run Code Online (Sandbox Code Playgroud)\n我们可以看到我们在这里找到了日志文件:/home/gabriel/.config/google-chrome/Default/Platform Notifications/000003.log
。
查看此日志文件中的最后 10 行或日志条目:
\n tail -n 10 "/home/gabriel/.config/google-chrome/Default/Platform Notifications/000003.log"\n
Run Code Online (Sandbox Code Playgroud)\n最后 3 项的示例输出 ( tail -n 3 "/home/gabriel/.config/google-chrome/Default/Platform Notifications/000003.log"
)。请注意,尝试阅读和解释这是多么愚蠢!
$ tail -n 3 "/home/gabriel/.config/google-chrome/Default/Platform Notifications/000003.log"\n o"link"dhttps://www.reddit.com/r/AskReddit/comments/est2b4/what_would_be_the_worst_thing_to_put_in_a_pi\xef\xbf\xbdata/"correlation_id"$1b7b2ef8-3ebb-4532-81ec-f896e58edaff"\n message_type"lifecycle_post_suggestions" device_id"@a5df86650804f98993acc43b31efa4ec0c733485b8cef4d8fe64a01ad07e9e09"auto_dismiss_optionsobehavior"timed"dismiss_time_msI\xef\xbf\xbd\xef\xbf\xbd{{X`\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdhrz* p#https://www.reddit.com/#01019308@H\xce\xb3\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdP\xef\xbf\xbd-X\xef\xbf\xbd-`\xef\xbf\xbd-hp\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd-\xef\xbf\xbd\xef\xbf\xbd<DATA:https_www.reddit.com_0p#https://www.reddit.com/#010193ARESOURCES:https_www.reddit.com_0p#https://www.reddit.com/#010193\xef\xbf\xbd_Q\xef\xbf\xbd\xef\xbf\xbd<DATA:https_www.reddit.com_0p#https://www.reddit.com/#010193ARESOURCES:https_www.reddit.com_0p#https://www.reddit.com/#010193\xef\xbf\xbd\n \xef\xbf\xbd\xef\xbf\xbd<DATA:https_www.reddit.com_0p#https://www.reddit.com/#010193ARESOURCES:https_www.reddit.com_0p#https://www.reddit.com/#010193\xef\xbf\xbd\xef\xbf\xbd,\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdDATA:https_www.youtube.com_0p#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg\xef\xbf\xbdhttps://www.youtube.com/"\xef\xbf\xbd\n SpaceX In-Flight Abort Test"Recommended: NASA Video*\xef\xbf\xbdSpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAo"nav"B/watch?v=mu5Ydz34oVc&feature=push-fr&attr_tag=WQZST9cYBH8yY01w%3A6"id"COvK+bnsmucCEJQB"attributionTag"WQZST9cYBH8yY01w:6{X`\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdhrz*\xef\xbf\xbdp#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg08@H\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdhp\xef\xbf\xbdq\xef\xbf\xbdI\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdDATA:https_www.youtube.com_0p#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg\xef\xbf\xbdhttps://www.youtube.com/"\xef\xbf\xbd\n SpaceX In-Flight Abort Test"Recommended: NASA Video*\xef\xbf\xbdSpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAo"nav"B/watch?v=mu5Ydz34oVc&feature=push-fr&attr_tag=WQZST9cYBH8yY01w%3A6"id"COvK+bnsmucCEJQB"attributionTag"WQZST9cYBH8yY01w:6{X`\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdhrz*\xef\xbf\xbdp#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg08@H\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd`\xef\xbf\xbdhp\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbdDATA:https_www.youtube.com_0p#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg\xef\xbf\xbdRESOURCES:https_www.youtube.com_0p#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg\n
Run Code Online (Sandbox Code Playgroud)\ntail -n 10 "$( find ~ | grep --extended-regexp "google-chrome.{0,30}Platform Notifications.*\\.log$" | tail -n 1 )"\n
Run Code Online (Sandbox Code Playgroud)\n或者更好的是,还打印出日志文件的路径:
\nLOG_FILE="$( find ~ | grep --extended-regexp \\\n"google-chrome.{0,30}Platform Notifications.*\\.log$" | tail -n 1 )"; \\\necho -e "LOG_FILE=\\"$LOG_FILE\\"\\n---------\\n"; tail -n 10 "$LOG_FILE"\n
Run Code Online (Sandbox Code Playgroud)\n谁能让这个输出看起来不那么丑陋?我希望以更易读的格式查看先前的通知!
\n2020 年 5 月 25 日更新:
\n这里离有用的东西更近了一步:运行上面的“最后一行”后,执行此操作以从二进制文件中提取 ASCII 字符,并删除无关的空格。
\nstrings "$LOG_FILE" | sed -E \'s/[ ]{8,}/\\n/g\'\n
Run Code Online (Sandbox Code Playgroud)\n首先,strings
从二进制文件中提取 ASCII 字符串。然后, "\'s\'tream \'ed\'itor", , sed
\'g\'lobally 用换行符替换 \'s\'tring 中 8 个或更多空格的所有实例,\\n
因为我注意到有时连续有数十个甚至数百个空格,这极大地降低了可读性。in允许“E”扩展正则表达式搜索-E
。sed
请注意,上面的一行命令已经将文件路径存储到LOG_FILE
变量中,因此我们将在此处重新使用该变量。看看echo "$LOG_FILE"
您是否需要查看该变量保存的内容。
完成上述操作后,您将得到如下内容:
\n$ strings temp.txt | sed -E \'s/[ ]{8,}/\\n/g\'\no"link"dhttps://www.reddit.com/r/AskReddit/comments/est2b4/what_would_be_the_worst_thing_to_put_in_a_pi\nata/"correlation_id"$1b7b2ef8-3ebb-4532-81ec-f896e58edaff"\n\nmessage_type"lifecycle_post_suggestions" device_id"@a5df86650804f98993acc43b31efa4ec0c733485b8cef4d8fe64a01ad07e9e09"auto_dismiss_optionsobehavior"timed"dismiss_time_msI\n{{X`\nhrz* p#https://www.reddit.com/#01019308@H\n<DATA:https_www.reddit.com_0p#https://www.reddit.com/#010193ARESOURCES:https_www.reddit.com_0p#https://www.reddit.com/#010193\n<DATA:https_www.reddit.com_0p#https://www.reddit.com/#010193ARESOURCES:https_www.reddit.com_0p#https://www.reddit.com/#010193\n\n\n<DATA:https_www.reddit.com_0p#https://www.reddit.com/#010193ARESOURCES:https_www.reddit.com_0p#https://www.reddit.com/#010193\nDATA:https_www.youtube.com_0p#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg\nhttps://www.youtube.com/"\n\nSpaceX In-Flight Abort Test"Recommended: NASA Video*\nSpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAo"nav"B/watch?v=mu5Ydz34oVc&feature=push-fr&attr_tag=WQZST9cYBH8yY01w%3A6"id"COvK+bnsmucCEJQB"attributionTag"WQZST9cYBH8yY01w:6{X`\nhrz*\np#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg08@H\nDATA:https_www.youtube.com_0p#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg\nhttps://www.youtube.com/"\n\nSpaceX In-Flight Abort Test"Recommended: NASA Video*\nSpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAo"nav"B/watch?v=mu5Ydz34oVc&feature=push-fr&attr_tag=WQZST9cYBH8yY01w%3A6"id"COvK+bnsmucCEJQB"attributionTag"WQZST9cYBH8yY01w:6{X`\nhrz*\np#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg08@H\nDATA:https_www.youtube.com_0p#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg\nRESOURCES:https_www.youtube.com_0p#https://www.youtube.com/#1SpaceX In-Flight Abort TestRecommended: NASA Videohttps://lh4.googleusercontent.com/-yGgyfF0s0tA/AAAAAAAAAAI/AAAAAAAAAAA/kiuOchD_wtI/s96-mo/photo.jpg\n
Run Code Online (Sandbox Code Playgroud)\nsed
:小智 -2
看来 Pushbullet 可以解决您的问题。他们声称你可以使用他们的 Chrome 扩展程序查看错过的通知。
https://blog.pushbullet.com/2014/10/23/easily-access-your-recent-notifications-in-chrome/
归档时间: |
|
查看次数: |
115458 次 |
最近记录: |