Every player, one click away. One top bar button for everything that plays, apps and browser tabs: pause, skip or change the volume without switching windows, and see each new song in a small popup at a glance.
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
EGO-P-007 warning
JavaScript files should be reachable from extension.js or prefs.js
Some JavaScript files are not reachable from `extension.js` or `prefs.js` imports.
Don't include unnecessary files
bridge/earful-host.js
bridge/lib/artwork.js
bridge/lib/tab-player.js
| Version | Status |
|---|---|
| 0.2.2 (3) | Unreviewed |
| 0.2.1 (2) | Rejected |
| 0.2.0 (1) | Rejected |
Hi, thanks for reviewing Earful. A few notes on the parts that may look unusual. About the Shexli warning EGO-P-007: the three bridge/ files are not imported by extension.js or prefs.js on purpose. They are a separate program that browsers start, explained below. bridge/ (earful-host.js and bridge/lib/) A standalone GJS script with the shebang #!/usr/bin/env -S gjs -m. The extension never runs it. A browser starts it through native messaging, only when the user has added the Earful Bridge browser add-on. It reads and writes the native messaging pipe on stdin/stdout and publishes one MPRIS player per browser tab on the session bus, so Earful (and GNOME's own media controls) can show each tab. It makes no network requests. Covers that a page sends as data: URLs are written to $XDG_RUNTIME_DIR/earful/ and deleted when the tab goes away or the host exits. Native messaging manifests (lib/bridgeSetup.js) So that browsers can find the host, the extension writes one small JSON file, io.github.ngdev2.earful.json (name, description, path to bridge/earful-host.js, type stdio, and our add-on IDs as allowed origins / allowed extensions). It goes into ~/.config/<browser>/NativeMessagingHosts/ for Chromium-based browsers and ~/.mozilla/native-messaging-hosts/ (or ~/.config/mozilla/native-messaging-hosts/) for Firefox, and only for browsers that are installed (config folder or program found). This is the same approach GSConnect uses for its browser add-on. - It is behind the "browser-bridge" setting (Settings > Browser tabs), on by default. Switching it off removes the files. - Files are written with async Gio, only when the content changed, once per login (not again on every unlock), and again when the setting changes. Pending work is cancelled in disable() through a Gio.Cancellable. - The files stay while the extension is disabled, because disable() also runs on every screen lock and the browser should keep working; switching the setting off removes them. - The extension sets the executable bit on its own bridge/earful-host.js, because installing from a zip can drop it. No other file permissions are touched. No binaries, no subprocesses The package contains only JavaScript, CSS, SVG icons and the GSettings schema. The extension spawns no processes. Everything created in enable() (indicator, managers, keybinding, signal handlers) is destroyed or disconnected in disable(). Preferences The Browser tabs page lists the browsers found and, when the setting is on, writes the same manifests (so a browser installed since login works right away). For Snap Firefox only, it reads the xdg-desktop-portal PermissionStore entry (table webextensions, id io.github.ngdev2.earful) to show whether Firefox was denied permission to start the host. It changes that entry (DeletePermission) only when the user clicks "Ask again". Source: https://github.com/NGdev2/earful