Skip to content

Commit 12eca81

Browse files
committed
Fix timing issue, update readme and bump version to 0.1.2
1 parent 3875227 commit 12eca81

File tree

5 files changed

+36
-15
lines changed

5 files changed

+36
-15
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,36 @@ sequenceDiagram
5656

5757
## Installation
5858

59-
AIgis is currently in **active development** and not yet listed on the Chrome Web Store. You can install it manually in less than a minute:
59+
AIgis works on **all Chromium-based browsers** (Google Chrome, Microsoft Edge, Brave, Opera, Vivaldi, Arc, etc.).
60+
61+
Since it is currently in **active development** and not yet listed on the Web Stores, you can install it manually in less than a minute:
6062

6163
1. **Download:** Go to the [Releases Page](../../releases) and download the latest `AIgis-vX.X.X.zip` (found under "Assets").
6264
2. **Unzip:** Extract the ZIP file into a folder of your choice.
63-
3. **Open Chrome Extensions:** Navigate to `chrome://extensions/` in your browser.
64-
4. **Enable Developer Mode:** Toggle the switch **"Developer mode"** in the top-right corner.
65-
5. **Load Extension:** Click the **"Load unpacked"** button (top left).
65+
3. **Open Extensions Page:**
66+
* **Chrome / Brave / Opera:** Navigate to `chrome://extensions/`
67+
* **Microsoft Edge:** Navigate to `edge://extensions/`
68+
4. **Enable Developer Mode:** Toggle the switch **"Developer mode"** (usually in the top-right corner or left sidebar).
69+
5. **Load Extension:** Click the **"Load unpacked"** button.
6670
6. **Select:** Select the folder you just extracted.
6771

6872
**Ready!** AIgis is now active. We recommend pinning the extension icon to your toolbar for quick access to the toggle switch.
6973

7074
> **Security Note:** Every release includes a `.sha256` checksum file. You can verify the integrity of the downloaded ZIP against this hash to ensure the file hasn't been tampered with.
7175
72-
### For Developers (Build from Source)
76+
### 💻 For Developers (Build from Source)
7377

7478
If you want to contribute or audit the code:
7579

7680
```bash
7781
# 1. Clone the repo
78-
git clone https://github.com/Karaatin/AIgis.git
82+
git clone [https://github.com/Karaatin/AIgis.git](https://github.com/Karaatin/AIgis.git)
7983

8084
# 2. Install dependencies
8185
npm install
8286

8387
# 3. Build the project
8488
npm run build
8589

86-
# 4. Load the 'dist' folder in Chrome (via "Load unpacked")
90+
# 4. Load the 'dist' folder in Chrome/Edge (via "Load unpacked")
8791
```

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "aigis-extension",
33
"private": true,
4-
"version": "0.1.0",
4+
"version": "0.1.2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite build --watch",

public/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "AIgis - Secure & Optimize AI Interactions",
4-
"version": "0.1.1",
4+
"version": "0.1.2",
55
"description": "Secure & optimize your AI interactions. A browser extension that masks secrets and optimizes tokens in prompts locally before sending them to LLMs.",
66
"author": "Keanu Caspers - github@Karaatin",
77
"icons": {

src/content.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const detector = new PiiDetector();
1313
let isProcessing = false;
1414
let settings = null;
1515

16-
(async () => {
16+
async function initAIgis() {
1717
try {
1818
settings = await StorageManager.getSettings();
1919
Logger.init(settings);
@@ -23,15 +23,32 @@ let settings = null;
2323
ResponseHandler.updateVault(vault);
2424

2525
if (settings.settings.enabled) {
26-
ResponseHandler.init();
27-
Logger.info("🛡️ [AIgis] Response Observer active.");
26+
if (document.body) {
27+
ResponseHandler.init();
28+
Logger.info("🛡️ [AIgis] Response Observer active.");
29+
} else {
30+
const observer = new MutationObserver(() => {
31+
if (document.body) {
32+
observer.disconnect();
33+
ResponseHandler.init();
34+
Logger.info("🛡️ [AIgis] Response Observer active (delayed).");
35+
}
36+
});
37+
observer.observe(document.documentElement, { childList: true });
38+
}
2839
}
2940

3041
Logger.info("AIgis Content Script loaded & ready.");
3142
} catch (e) {
3243
console.error("AIgis Init Error:", e);
3344
}
34-
})();
45+
}
46+
47+
if (document.readyState === 'loading') {
48+
document.addEventListener('DOMContentLoaded', initAIgis);
49+
} else {
50+
initAIgis();
51+
}
3552

3653
chrome.storage.onChanged.addListener(async (changes, namespace) => {
3754
if (namespace === 'sync') {

0 commit comments

Comments
 (0)