mirror of
https://github.com/aaronjmars/opendia.git
synced 2025-12-29 16:16:00 +00:00
first commit
This commit is contained in:
13
extension/content.js
Normal file
13
extension/content.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// Content script for interacting with web pages
|
||||
console.log('MCP Browser Bridge content script loaded');
|
||||
|
||||
// Listen for messages from the background script
|
||||
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
|
||||
if (request.action === 'getPageInfo') {
|
||||
sendResponse({
|
||||
title: document.title,
|
||||
url: window.location.href,
|
||||
content: document.body.innerText
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user