extension.js · part 9
Full reference14 text occurrences from desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, part 9. Every entry preserves the shipped literal and its saved verdict or selection reason.
File contents and all parts · All files
Shipped text
Whether to lock or unlock the browser for user interaction.
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 210953–211014, SHA-256 55f12cd9ccafa2aa.
Jev judged model-facing (confidence 0.82; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Whether to lock or unlock the browser for user interaction.
Whether to lock or unlock the browser for user interaction.
Target browser tab ID. If omitted, uses the last interacted tab.
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 211050–211116, SHA-256 4238efc15cdf7a6e.
Jev judged model-facing (confidence 0.85; role parameter). This is a classifier judgment, not proof of delivery.
Readable text: Target browser tab ID. If omitted, uses the last interacted tab.
Target browser tab ID. If omitted, uses the last interacted tab.
Browser Automation MCP Provider initialized with direct execution
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 211170–211237, SHA-256 d87caa80128ae124.
Jev judged not model-facing (confidence 0.12; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Browser Automation MCP Provider initialized with direct execution
Browser Automation MCP Provider initialized with direct execution
Executing tool: ${t} with args: ${JSON.stringify(e)}
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 211344–211398, SHA-256 322786a13e6151d1.
Jev judged not model-facing (confidence 0.14; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Executing tool: ${t} with args: ${JSON.stringify(e)}
Executing tool: ${t} with args: ${JSON.stringify(e)}
Unknown tool: ${t}
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 212601–212621, SHA-256 db9aaaef5e4aedbc.
Jev judged not model-facing (confidence 0.09; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Unknown tool: ${t}
Unknown tool: ${t}
Error executing tool ${t}:
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 212660–212688, SHA-256 deb9d1faa21fb49e.
Jev judged not model-facing (confidence 0.1; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Error executing tool ${t}:
Error executing tool ${t}:
Failed to clear device emulation on ${e.viewId} at the end of a turn: ${String(t
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 213097–213181, SHA-256 f9587613958d12c5.
Jev judged not model-facing (confidence 0.04; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Failed to clear device emulation on ${e.viewId} at the end of a turn: ${String(t)}
Failed to clear device emulation on ${e.viewId} at the end of a turn: ${String(t)}
Browser Automation MCP Provider disposed
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 213207–213249, SHA-256 50c9a09929e790d8.
Jev judged not model-facing (confidence 0.05; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Browser Automation MCP Provider disposed
Browser Automation MCP Provider disposed
injectBrowserUIScript called
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 213289–213319, SHA-256 dea3e0b461586787.
Jev judged not model-facing (confidence 0.06; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: injectBrowserUIScript called
injectBrowserUIScript called
(function() { // Prevent double injection if (window. cursorBrowserAutomationIn
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 213353–220664, SHA-256 834ff2364d3643cc.
Jev judged not model-facing (confidence 0.02; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: (function() { // Prevent double injection if (window.__cursorBrowserAutomationInjected) { return; } // Only inject in top-level frame if (window !== window.top) { return; } window.__cursorBrowserAutomationInjected = true; co…
(function() {
// Prevent double injection
if (window.__cursorBrowserAutomationInjected) {
return;
}
// Only inject in top-level frame
if (window !== window.top) {
return;
}
window.__cursorBrowserAutomationInjected = true;
const tabId = ${JSON.stringify(t)};
// =============================================================================
// Area Screenshot Selection
// =============================================================================
// IMPORTANT: BrowserEditorContent.tsx may also inject area screenshot handling
// via BROWSER_AREA_SCREENSHOT_SCRIPT. Check if it's already injected to avoid
// duplicate screenshot captures.
const areaScreenshotAlreadyInjected = window.__cursorAreaScreenshotInjected === true;
let isDragging = false;
let dragStartX = null;
let dragStartY = null;
let dragSelectionBox = null;
let areaDragListeners = null;
function enableAreaSelection() {
// Skip if BrowserEditorContent already handles area screenshots
if (areaScreenshotAlreadyInjected) {
return;
}
const mousedownListener = (e) => {
if (!e.isTrusted) return;
// Only start drag if not clicking on any overlay elements
if (e.target.getAttribute &&
e.target.getAttribute('data-cursor-overlay') === 'true'
) {
return;
}
e.preventDefault();
e.stopPropagation();
isDragging = true;
dragStartX = e.clientX;
dragStartY = e.clientY;
// Hide any existing overlays
const overlays = document.querySelectorAll('[data-cursor-overlay="true"]');
overlays.forEach(el => el.style.display = 'none');
if (!dragSelectionBox) {
dragSelectionBox = document.createElement('div');
dragSelectionBox.style.cssText = 'position:fixed;background:rgba(58,150,221,0.1);border:2px dashed #3a96dd;pointer-events:none;z-index:2147483647;';
document.body.appendChild(dragSelectionBox);
}
dragSelectionBox.style.left = dragStartX + 'px';
dragSelectionBox.style.top = dragStartY + 'px';
dragSelectionBox.style.width = '0px';
dragSelectionBox.style.height = '0px';
};
const mousemoveListener = (e) => {
if (!isDragging || !dragSelectionBox) return;
const currentX = e.clientX;
const currentY = e.clientY;
const left = Math.min(dragStartX, currentX);
const top = Math.min(dragStartY, currentY);
const width = Math.abs(currentX - dragStartX);
const height = Math.abs(currentY - dragStartY);
dragSelectionBox.style.left = left + 'px';
dragSelectionBox.style.top = top + 'px';
dragSelectionBox.style.width = width + 'px';
dragSelectionBox.style.height = height + 'px';
};
const mouseupListener = (e) => {
if (!isDragging || !e.isTrusted) return;
e.preventDefault();
e.stopPropagation();
const currentX = e.clientX;
const currentY = e.clientY;
const left = Math.min(dragStartX, currentX);
const top = Math.min(dragStartY, currentY);
const width = Math.abs(currentX - dragStartX);
const height = Math.abs(currentY - dragStartY);
if (width > 5 || height > 5) {
const bounds = {
x: Math.round(left),
y: Math.round(top),
width: Math.round(width),
height: Math.round(height)
};
if (dragSelectionBox) {
dragSelectionBox.remove();
dragSelectionBox = null;
}
disableAreaSelection();
// Send area screenshot selection
requestAnimationFrame(() => {
requestAnimationFrame(() => {
if (window.cursorBrowser) {
window.cursorBrowser.send('area-screenshot-selected', {
bounds: bounds
});
}
// Area selection is complete, element selection will continue to work
// No need to re-enable as the overlay system maintains its own state
});
});
} else {
if (dragSelectionBox) {
dragSelectionBox.remove();
dragSelectionBox = null;
}
}
isDragging = false;
};
document.addEventListener('mousedown', mousedownListener, true);
document.addEventListener('mousemove', mousemoveListener);
document.addEventListener('mouseup', mouseupListener, true);
areaDragListeners = {
mousedown: mousedownListener,
mousemove: mousemoveListener,
mouseup: mouseupListener
};
}
function disableAreaSelection() {
// Skip if BrowserEditorContent already handles area screenshots
if (areaScreenshotAlreadyInjected) {
return;
}
isDragging = false;
dragStartX = null;
dragStartY = null;
if (dragSelectionBox) {
dragSelectionBox.remove();
dragSelectionBox = null;
}
if (areaDragListeners) {
const { mousedown, mousemove, mouseup } = areaDragListeners;
document.removeEventListener('mousedown', mousedown, true);
document.removeEventListener('mousemove', mousemove);
document.removeEventListener('mouseup', mouseup, true);
areaDragListeners = null;
}
}
// =============================================================================
// Message Handling
// =============================================================================
function onAreaScreenshotCommand(data) {
if (!data || !data.type) {
return;
}
if (data.type === 'enable-element-selection') {
if (data.enableAreaSelection) {
enableAreaSelection();
}
} else if (data.type === 'disable-element-selection') {
disableAreaSelection();
} else if (data.type === 'start-area-screenshot') {
enableAreaSelection();
} else if (data.type === 'stop-area-screenshot') {
disableAreaSelection();
}
}
if (typeof window.__cursorAreaScreenshotCommand !== 'function') {
window.__cursorAreaScreenshotCommand = onAreaScreenshotCommand;
}
// =============================================================================
// Keyboard Shortcuts
// =============================================================================
document.addEventListener('keydown', (e) => {
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
const cmdOrCtrl = isMac ? e.metaKey : e.ctrlKey;
if (cmdOrCtrl && !e.altKey) {
if (e.key === 'a' && !e.shiftKey) {
e.preventDefault();
e.stopPropagation();
const target = e.target;
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) {
target.select();
} else if (target instanceof HTMLElement && target.isContentEditable) {
const selection = window.getSelection();
const range = document.createRange();
range.selectNodeContents(target);
selection?.removeAllRanges();
selection?.addRange(range);
} else {
document.execCommand('selectAll');
}
return;
}
}
}, true);
})();
Browser UI script injected successfully
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 220762–220803, SHA-256 f8428c8ee085105d.
Jev judged not model-facing (confidence 0.05; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Browser UI script injected successfully
Browser UI script injected successfully
Failed to inject browser UI script:
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 220822–220859, SHA-256 d24c8673cc4a629b.
Jev judged not model-facing (confidence 0.04; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Failed to inject browser UI script:
Failed to inject browser UI script:
Cursor Browser Automation extension activated
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 220906–220953, SHA-256 d304fd5b6dc7ffe9.
Jev judged not model-facing (confidence 0.05; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Cursor Browser Automation extension activated
Cursor Browser Automation extension activated
Using Browser MCP provider
Source: desktop/Cursor.app/Contents/Resources/app/extensions/cursor-browser-automation/dist/extension.js, bytes 220962–220990, SHA-256 15d36b3a477cd1f9.
Jev judged not model-facing (confidence 0.1; role code_data). This is a classifier judgment, not proof of delivery.
Readable text: Using Browser MCP provider
Using Browser MCP provider