Skip to content

Instantly share code, notes, and snippets.

@tartakovsky
Last active July 31, 2025 09:21
Show Gist options
  • Select an option

  • Save tartakovsky/04f8e380c3ea3d92a9f6efb1076ce139 to your computer and use it in GitHub Desktop.

Select an option

Save tartakovsky/04f8e380c3ea3d92a9f6efb1076ce139 to your computer and use it in GitHub Desktop.
Based on the search results, I can see that TypingMind extensions work differently than I initially described. Here's the correct minimal hello world extension and deployment method:
## Minimal Hello World Extension
```javascript
// Hello World TypingMind Extension
(function() {
'use strict';
console.log('Hello World Extension loaded!');
// Wait for the app to be ready
function waitForApp() {
if (typeof window !== 'undefined' && document.body) {
// Simple DOM manipulation example
const style = document.createElement('style');
style.textContent = `
.hello-world-banner {
position: fixed;
top: 10px;
right: 10px;
background: #4CAF50;
color: white;
padding: 10px;
border-radius: 5px;
z-index: 9999;
font-size: 14px;
}
`;
document.head.appendChild(style);
const banner = document.createElement('div');
banner.className = 'hello-world-banner';
banner.textContent = 'Hello World Extension Active!';
document.body.appendChild(banner);
// Remove banner after 3 seconds
setTimeout(() => {
banner.remove();
}, 3000);
} else {
setTimeout(waitForApp, 100);
}
}
waitForApp();
})();
```
## How to Deploy
Based on your screenshot, TypingMind extensions require a **publicly accessible URL** to a JavaScript file. Here's how to deploy:
### Method 1: GitHub Gist (Easiest)
1. Go to https://gist.github.com
2. Create a new gist with the JavaScript code above
3. Name it `hello-world-extension.js`
4. Make it public
5. Click "Create public gist"
6. Click the "Raw" button to get the direct URL
7. Copy that URL and paste it into the TypingMind extension field
8. Click "Install"
### Method 2: GitHub Repository
1. Create a new GitHub repository
2. Add the JavaScript file
3. Use the raw GitHub URL: `https://raw.githubusercontent.com/yourusername/yourrepo/main/extension.js`
4. Paste this URL into TypingMind and click "Install"
### Method 3: Any Web Hosting
1. Upload the JavaScript file to any web server
2. Ensure it's publicly accessible
3. Set proper CORS headers and MIME type (`application/javascript`)
4. Use that URL in TypingMind
## Requirements
- The URL must be publicly accessible
- Must have MIME type `application/javascript` or `text/javascript`
- Must have proper CORS settings
- Extensions load once when the app starts
The extension I provided will show a green "Hello World Extension Active!" banner in the top-right corner for 3 seconds when loaded, confirming it's working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment