Skip to content

Add Chrome extension for GitHub Chat#12

Open
MISUN934 wants to merge 3 commits into
inquid:masterfrom
MISUN934:feature/chrome-extension
Open

Add Chrome extension for GitHub Chat#12
MISUN934 wants to merge 3 commits into
inquid:masterfrom
MISUN934:feature/chrome-extension

Conversation

@MISUN934
Copy link
Copy Markdown

Implements a Manifest V3 Chrome extension that injects a real-time chat widget into all github.com pages via content script + iframe. Includes toggle button in bottom-right corner, Firebase Firestore messaging, message deletion, and responsive design.

Closes #1

Implements a Manifest V3 Chrome extension that injects a real-time
chat widget into all github.com pages via content script + iframe.
Includes toggle button in bottom-right corner, Firebase Firestore
messaging, message deletion, and responsive design.

Closes inquid#1

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e158967fc9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread chrome-extension/chat-widget.html Outdated
Comment on lines +22 to +24
<script src="https://www.gstatic.com/firebasejs/8.5.0/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.5.0/firebase-database.js"></script>
<script src="https://www.gstatic.com/firebasejs/8.5.0/firebase-firestore.js"></script>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bundle Firebase scripts inside extension package

Manifest V3 extension pages run under a CSP that only allows local scripts, so loading Firebase from https://www.gstatic.com/... will be blocked at runtime. In this state firebase never initializes and the chat widget fails to load/send messages on GitHub pages. Move these dependencies into packaged extension files (or bundle them) and reference them locally.

Useful? React with 👍 / 👎.

Comment thread chrome-extension/chat-widget.js Outdated
Comment on lines +83 to +90
var isSent = data.sender === myName;
var msgEl = document.createElement("div");
msgEl.id = "message-" + id;
msgEl.className = "message " + (isSent ? "sent" : "received");

var senderHtml = data.sender ? '<div class="sender">' + escapeHtml(data.sender) + "</div>" : "";
var deleteBtnHtml = isSent
? '<button class="delete-btn" data-id="' + id + '" title="Delete message">x</button>'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate message deletion on immutable user identity

The "own message" check is based only on data.sender === myName, where myName is an arbitrary localStorage display name. If two people choose the same name, each client will treat the other's messages as theirs and expose the delete control, which can remove other users' messages in setups that allow client-side deletes. Use an authenticated, non-spoofable user ID for ownership checks.

Useful? React with 👍 / 👎.

MISUN934 and others added 2 commits May 18, 2026 19:56
- Bundle Firebase scripts locally instead of loading from CDN (P1: CSP compliance)
- Add immutable user ID (myUid) for message ownership instead of display name (P2)
- Update manifest web_accessible_resources to include firebase files

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Move Firebase config to firebase-config.js (gitignored)
- Provide firebase-config.example.js as template
- Load config via window.FIREBASE_CONFIG before initialization
- Resolves GitHub secret scanning alerts for API key exposure

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add this to a Chrome Extension

1 participant