Skip to content

Commit 02e0a59

Browse files
committed
enya: the humming
1 parent 8d021e8 commit 02e0a59

25 files changed

+658
-501
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ node_modules/
1111
# application autogenerated files not for git
1212
*.js.map
1313
*.zip
14+
*.crx
1415
manifest.json
1516
bundle/js

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"fileMatch": ["manifest.json"],
77
"url": "https://json.schemastore.org/chrome-manifest.json"
88
}
9-
]
9+
],
10+
"typescript.tsdk": "node_modules/typescript/lib"
1011
}

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ Chrome extension to compare objects in memory with console.diff(old, new) devtoo
6969

7070
- Compared objects, after being serialized, stored in `chrome.storage.local` wich has 10MB limit (before chrome v114 was 5MB).
7171

72+
- In Firefox the API is under `jsdiff` object for now, cause extension API's not fully compatible.
73+
7274
### API
7375

7476
- **console.diff(left, right)** - compare left and right arguments
@@ -113,7 +115,7 @@ Historically, left side represents the old state and right side the new state.
113115

114116
- To track changes of the same variable in timed manner you can push it with `diffPush` or `diff` with a single argument, - that will shift objects from right to left, showing differences with previous push state.
115117

116-
### How it works
118+
### How it works (in chrome mv3)
117119

118120
![screenshot](./doc/design.png)
119121

@@ -123,15 +125,15 @@ Historically, left side represents the old state and right side the new state.
123125

124126
```sh
125127
make install # to install dependencies
126-
make all # build for prod and make extension.zip
128+
make all # build for prod and make extension.${browser}.zip
127129
make tune2chrome # or tune2firefox for relevant manifest
128130
make dev # local development
129131
```
130132

131133
### Protection
132134

133135
- How to protect your site from this extension:
134-
- Well, tests show that even `Content-Security-Policy: default-src 'none';` header won't prevent injection of extension content-scripts...
136+
- Well, tests on chrome show that even `Content-Security-Policy: default-src 'none';` header won't prevent injection of extension content-scripts...
135137
- Avoid assigning to `window` or `globalThis` any application object.
136138
See also [accidental global variables and memory leaks](https://www.tutorialspoint.com/explain-in-detail-about-memory-leaks-in-javascript).
137139
- In general, you can incapacitate console functions:

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
},
1414
"keywords": [
1515
"devtools",
16+
"diff",
1617
"chrome",
1718
"extension"
1819
],
@@ -25,22 +26,24 @@
2526
"type": "module",
2627
"devDependencies": {
2728
"@types/chrome": "0.0.256",
29+
"@types/diff-match-patch": "^1.0.36",
2830
"@types/firefox-webext-browser": "120.0.0",
2931
"@types/webpack-bundle-analyzer": "4.6.3",
30-
"@vue/compiler-sfc": "3.4.9",
32+
"@vue/compiler-sfc": "3.4.13",
3133
"clean-webpack-plugin": "4.0.0",
3234
"css-loader": "6.9.0",
3335
"diff-match-patch": "^1.0.5",
3436
"esbuild": "0.19.11",
3537
"esbuild-loader": "4.0.2",
3638
"jsondiffpatch": "0.6.0",
37-
"prettier": "3.1.1",
39+
"pinia": "^2.1.7",
40+
"prettier": "3.2.2",
3841
"sass": "1.69.7",
3942
"sass-loader": "13.3.3",
4043
"style-loader": "3.3.4",
4144
"ts-node": "10.9.2",
4245
"typescript": "5.3.3",
43-
"vue": "3.4.9",
46+
"vue": "3.4.13",
4447
"vue-loader": "17.4.2",
4548
"webpack": "5.89.0",
4649
"webpack-bundle-analyzer": "4.10.1",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)