Skip to content

Instantly share code, notes, and snippets.

@MikeCraig418
Created September 10, 2025 21:53
Show Gist options
  • Save MikeCraig418/40b988e774666ad4900bb65727f5d52d to your computer and use it in GitHub Desktop.
Save MikeCraig418/40b988e774666ad4900bb65727f5d52d to your computer and use it in GitHub Desktop.
javascript:(function(){
console.log('🥔 Launching Potato Takeover iframe...');
// Remove any existing potato overlay
var existing = document.getElementById('potato-overlay');
if (existing) existing.remove();
// Create overlay container
var overlay = document.createElement('div');
overlay.id = 'potato-overlay';
overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999;background:black;';
// Create iframe
var iframe = document.createElement('iframe');
iframe.src = 'https://potato-b0ec4.web.app/';
iframe.style.cssText = 'width:100%;height:100%;border:none;';
iframe.allow = 'fullscreen';
// Listen for messages from iframe
window.addEventListener('message', function(event) {
if (event.data === 'CLOSE_POTATO') {
overlay.remove();
// Exit fullscreen if we're in it
if (document.exitFullscreen) {
document.exitFullscreen().catch(function(){});
}
}
});
// Append elements
overlay.appendChild(iframe);
document.body.appendChild(overlay);
// Focus the iframe when it loads
iframe.onload = function() {
iframe.contentWindow.focus();
console.log('🎯 Iframe focused for keyboard input');
};
// Also focus on clicks
iframe.onclick = function() {
iframe.contentWindow.focus();
};
// Try to go fullscreen immediately
if (document.documentElement.requestFullscreen) {
try {
document.documentElement.requestFullscreen().catch(function(err) {
console.log('Fullscreen failed:', err);
});
} catch(e) {
console.log('Fullscreen not supported or blocked');
}
}
console.log('✅ Potato Takeover iframe launched successfully!');
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment