Repository navigation
Hand the session to the Firefox extension too - #11
Open
InventivetalentDev wants to merge 1 commit into
Open
InventivetalentDev wants to merge 1 commit into
InventivetalentDev wants to merge 1 commit into
Conversation
Firefox doesn't let web pages message an extension (no externally_connectable, Mozilla bug 1319168), so chrome.runtime is undefined here. The ping threw, the download links stayed up, the session never reached the extension, and the ?sessionOnly tab the extension opens never closed. $scope.extension.send() keeps using chrome.runtime.sendMessage() where Chrome exposes it. Otherwise it posts the message to this window, where the extension's siteBridge.js content script (RemoteSlide/RemoteSlide-Chrome, same branch) relays it and posts the answer back. The ?sessionOnly tab now closes once the extension has answered, which the bridge needs before the tab goes away, or after a second at the latest: extension versions up to 1.2.0 never answer the session message, so Chrome users still on one would otherwise keep the tab. Checked in Chromium 141 with both the current and the new extension, and in Firefox 158 and ESR 140 with the new one: extension detected, session stored, ?sessionOnly tab closed. Adds extension_firefox to the injector names in PROTOCOL.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01P3g3vcYRESg89oZuTf7eP5
This was referenced Oct 18, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Website side of Firefox support for the extension (RemoteSlide/RemoteSlide-Chrome#5).
Problem
Firefox doesn't let web pages message an extension: it has no
externally_connectable(bug 1319168), sochrome.runtimeis undefined here. As a result:?sessionOnlytab the extension opens never closed.Changes
$scope.extension.send()keeps usingchrome.runtime.sendMessage()where Chrome exposes it. Otherwise it posts the message to this window, where the extension'ssiteBridge.jscontent script relays it and posts the answer back.?sessionOnlytab now closes once the extension has answered, because the bridge needs to finish before the tab goes away. It also closes after 900 ms at the latest. Extension versions up to 1.2.0 never answer the session message, so without that fallback, Chrome users still on one would keep the tab open.PROTOCOL.mdlistsextension_firefoxamong the injector names.static/inject/controlleris deliberately not bumped to RemoteSlide/RemoteSlide-Controller#3: that fix only matters to the extension, not the bookmarklet.Safe to deploy first
Merging deploys the site (
deploy.ymlruns on every push to master). The new site therefore goes live before the extension update reaches anyone, and it works with the extension currently in the Chrome Web Store. Tested against a localwrangler dev, with remote-sli.de resolved to it:?sessionOnlytab closesAs a control, the current master site with the new extension fails all three checks in Firefox.
npm run typecheckandnpm test(17 tests) pass locally.Still to do once the add-on is listed on AMO: a Firefox download link next to the Chrome Web Store badge.
Generated by Claude Code