Open external links in a new tab instead of an iframe

Modify the openIframeWindow function in os.tsx to open external URLs in a new browser tab, as most external websites block iframe embedding.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 279f1558-c0e3-40e4-8217-be7e9f4c6eca
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: e5a5b8fb-9e45-4554-89ab-9518b18737f3
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/b984cb14-1d19-4944-922b-bc79e821ed35/279f1558-c0e3-40e4-8217-be7e9f4c6eca/2U7MTOE
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sirpiglr 2025-12-21 04:44:05 +00:00
parent ce2609f773
commit cc24d3d90e

View file

@ -701,24 +701,8 @@ export default function AeThexOS() {
};
const openIframeWindow = (url: string, title: string) => {
const windowId = `iframe-${Date.now()}`;
setWindows(prev => [...prev, {
id: windowId,
title,
icon: <Globe className="w-4 h-4" />,
component: 'iframe',
x: 100 + Math.random() * 100,
y: 100 + Math.random() * 100,
width: 900,
height: 600,
minimized: false,
maximized: false,
zIndex: maxZIndex + 1,
desktopId: currentDesktop,
iframeUrl: url
}]);
setMaxZIndex(prev => prev + 1);
setActiveWindowId(windowId);
// Most external sites block iframe embedding - open in new tab instead
window.open(url, '_blank', 'noopener,noreferrer');
};
if (isBooting) {