persistent-serviceworker
chrome-extensions-samples
persistent-serviceworker | chrome-extensions-samples | |
---|---|---|
8 | 27 | |
20 | 14,290 | |
- | 1.2% | |
2.8 | 8.5 | |
4 months ago | 6 days ago | |
JavaScript | JavaScript | |
- | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
persistent-serviceworker
-
How to keep a serviceworker (background.js) alive in a chrome extension
Here you go persistent-serviceworker.
-
[AskJS] Do specification authors and implementers listen to developers in the field?
The ServiceWorker becoming inactive in 5 minutes per MV3 is a debacle. Workarounds exist and the code to implement keeping the ServiceWorker persistent, e.g., to stream live radio station from the ServiceWorker to the client winds up not saving any resources - we have to keep something running to keep the service worker running. You would be hard-pressed to count how many issues in the wild have been filed in multiple source code repositories just on that lack of functionality - for years now, e.g., Need help to understand and use this #2.
-
[AskJS] What are the worst case scenarios for programmatically setting arbitrary Web pages (Origins) as Client or WindowClient of a ServiceWorker?
There are workarounds which involve using an iframe https://github.com/guest271314/persistent-serviceworker/tree/main/chromium_extension_web_accessible_resources_iframe_message_event or window.open() https://github.com/guest271314/sw-transfer-stream or and offscreen document https://github.com/guest271314/offscreen-webrtc with WebRTC - however that involves loading an entire HTML document, and each has its own deficienfies - with all of the Window features that we do not really need just to transfer data between the Web page I have control of and the ServiceWorker I have control of.
-
Transfer ArrayBuffer from ServiceWorker to Web page
One approach for your requirement is to append an iframe with src set to an HTML document listed in "web_accessible_resources" to an arbitrary document and use postMessage() from the Web page to the iframe, then from the iframe to the MV3 ServiceWorker, see https://github.com/guest271314/persistent-serviceworker/tree/main/chromium_extension_web_accessible_resources_iframe_message_event.
-
How to have background:persistent in V3?
See https://github.com/guest271314/persistent-serviceworker
-
Manifest 3 limitation with background.js
Yes, it is possible to keep an extension or non-extension ServiceWorker persistent, active indefinitely https://github.com/guest271314/persistent-serviceworker.
-
Confirming isolation of cross-domain iframe (chrome extension context)
If you host the HTML for and use
"web_accessible_resources"
in manifest.json the</code> can communicate directly with MV3 <code>ServiceWorker</code>. </p> <p>To keep MV3 <code>ServiceWorker</code> persistent see <a href="https://github.com/guest271314/persistent-serviceworker">https://github.com/guest271314/persistent-serviceworker</a>.</p> </div>
-
Manifest v3: how to mitigate the timeout of the service worker?
I utilize "web_accessible_resources" with an , where chrome.* API's are exposed, and does not become inactive.
Some workarounds to keep MV3
ServiceWorker
active Persistent ServiceWorker.
chrome-extensions-samples
-
How do I make this extension?
You should be using the context menu API. You can check out some of the examples to have a better idea. This single file should get you all the info you need - context menu basic example.
-
How to objectively value code refactoring?
Hell, I even included the fix for the broken Google Chrome chrome-extensions samples Python Native Messaging host in a PR I filed to update their sample https://github.com/GoogleChrome/chrome-extensions-samples/pull/617/commits/c26521ed60d6028dd73c84a2b726a1889b6616f7.
-
How can I do this in manifest v3 too in my chrome extention.
There are some examples here https://github.com/GoogleChrome/chrome-extensions-samples/issues/662 and here https://github.com/GoogleChrome/chrome-extensions-samples/issues/784.
-
When do you think X.org will become "officially" deprecated?
What happens when you try to run this Native Messaging host application https://github.com/GoogleChrome/chrome-extensions-samples/blob/main/_archive/mv2/api/nativeMessaging/host/native-messaging-example-host on your current machine without modifying anything in the file or installing a package that links python to Python 2 and not Python 3?
-
10 Coding Projects to Impress Employers and Land Your Dream Job 😎
Chrome Extension Examples - a collection of sample Chrome extensions to learn from
- [AskJS] What are the worst case scenarios for programmatically setting arbitrary Web pages (Origins) as Client or WindowClient of a ServiceWorker?
-
Rookie question: How do I know I am making progress with my JS learning?
Another more involved challenge: Transfer (e.g., using Transferable objects) an ArrayBuffer from a ServiceWorker to an arbitrary Web page not controlled by or in the scope of the ServiceWorker - without using an element https://github.com/GoogleChrome/chrome-extensions-samples/issues/766.
-
How do I use this python parameter in javascript?
You can use Native Messaging to connect to and communicate with a native host, e.g., Python, from JavaScript client in the browser, see https://github.com/GoogleChrome/chrome-extensions-samples/pull/617/commits/a06b4e37b7a095f845a321b0cd7adac5a3b41f02.
-
Is there any way to programmatically set an MV3 ServiceWorker's WindowClient?
Take the time to carefully read this Google Chrome extension samples issue Sample: Transfer a blob from a background context to a page #766.
-
Content Security Policy Error for Chrome Extension
You can use declarativeNetRequest to remove content-security-policy for specific Web sites or all Web sites, see https://github.com/guest271314/remove-csp-header; https://github.com/GoogleChrome/chrome-extensions-samples/issues/662.
What are some alternatives?
developer.chrome.com - The frontend, backend, and content source code for developer.chrome.com
octotree - GitHub on steroids
offscreen-webrtc - Offscreen document <=> WebRTC Data Channel <=> Web page
react-native-universal-monorepo - React Native boilerplate supporting multiple platforms: Android, iOS, macOS, Windows, web, browser extensions, Electron.
playwright-dotnet - .NET version of the Playwright testing and automation library.
vanced-website-v2 - Source Code of the Vanced Website
sw-transfer-stream - MV3 ServiceWorker => ReadableStream => Web page
wpt - Test suites for Web platform specs — including WHATWG, W3C, and others
ServiceWorkerFullVideoBuffer - A service worker that buffers a full video, so when the video tag ask for ranges, these can be satisfied. Play + pause = buffer the whole video.
tampermonkey - Tampermonkey is the most popular userscript manager, with over 10 million users. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.
captureSystemAudio - Capture system audio ("What-U-Hear")
browser_extension - A browser extension that redirects popular sites to alternative privacy friendly frontends