今日已更新 262 条资讯 | 累计 34546 条内容
关于我们

标签:#c

找到 27516 篇相关文章

AI 资讯

Show HN: An incremental build cache for Rust on GHA

Hi HN, I'm Kyle, the creator of Clipper, a container registry with 7x faster builds via lazy pulls and cache mount exports. In the process of implementing cache mount exports I ended up with a FUSE mounted filesystem backed by a remote content defined store. I went looking for fun things to do with it and found that there's not really a good way to keep Rust incremental build state around on ephemeral runners, so here we are. Rust generally uses https://github.com/mozilla/sccache for caching, bu

2026-07-16 原文 →
AI 资讯

I spent a week trying to intercept Slack push notifications from a Chrome extension. Here's why it's impossible.

After I published my last article about building a Chrome extension that speaks browser notifications aloud, a commenter asked a question I didn't have a good answer to. He pointed out that a lot of web apps — Slack, Gmail, most modern tools — fire their notifications from a service worker via registration.showNotification() , not from the page's JavaScript context. My MAIN world override of window.Notification would never reach those. He was right. And I told him I'd look into it. I spent a week researching whether there was any way to close that gap. There isn't. But the reason why is more interesting than a simple "no." Two ways a website can show you a notification When a website sends you a browser notification, it can do it in one of two ways. The first is the constructor path. The page's own JavaScript calls new Notification("You have a message") directly. This is common for in-tab alerts, real-time updates when you're actively on the site, or any notification triggered by something you just did. The second is the push path. The browser receives a push event from the website's server, wakes up the website's service worker in the background, and the service worker calls self.registration.showNotification() from inside its own scope. This is what happens when Slack notifies you of a new message while the tab is closed or backgrounded. The page never runs. No page JavaScript ever fires. My extension catches the first path. The MAIN world content script overrides window.Notification before any page code runs. But the service worker never touches the page's window. It has no window . It runs in a completely isolated thread, completely separate from the page, and calls showNotification on itself. The override is never reached. Why can't the extension reach the service worker? This is the part that took me a week to fully accept. Chrome extensions can inject content scripts into web pages. They can run code in the MAIN world or the ISOLATED world of a page. They can

2026-07-16 原文 →