You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-9Lines changed: 13 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,20 @@
5
5
Chrome extension to compare objects in memory with console.diff(old, new) devtools function.
6
6
7
7
<details>
8
-
<summary> <strong>Screenshots</strong> </summary>
8
+
<summary> <strong>Examples</strong> </summary>
9
9
10
10
- Comparing two objects
11
11

12
12
13
13
- Tracking changes in localStorage (unchanged are hidden)
14
14

15
15
16
+
</details>
17
+
<details>
18
+
<summary> <strong>How it works (in chrome mv3)</strong> </summary>
19
+
20
+

21
+
16
22
</details>
17
23
18
24
### Based on
@@ -35,7 +41,7 @@ Chrome extension to compare objects in memory with console.diff(old, new) devtoo
35
41
36
42
- JSDiff devtools panel reflects current state of comparison, regardless the tab[s] it was opened from.
37
43
38
-
-Basic integration with search functionality within devtools:
44
+
-Internal search inside comparison results
39
45
40
46
- If search query contains at least one upper-case letter - the search will be case-sensitive.
41
47
@@ -69,6 +75,8 @@ Chrome extension to compare objects in memory with console.diff(old, new) devtoo
69
75
70
76
- Compared objects, after being serialized, stored in `chrome.storage.local` wich has 10MB limit (before chrome v114 was 5MB).
71
77
78
+
- In Firefox the API is under `jsdiff` object for now, cause extension API's not fully compatible.
79
+
72
80
### API
73
81
74
82
-**console.diff(left, right)** - compare left and right arguments
@@ -113,25 +121,21 @@ Historically, left side represents the old state and right side the new state.
113
121
114
122
- 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.
115
123
116
-
### How it works
117
-
118
-

119
-
120
124
### How to build
121
125
122
126
- requires npm/nodejs
123
127
124
128
```sh
125
129
make install # to install dependencies
126
-
make all # build for prod and make extension.zip
127
-
make tune2chrome # or tune2firefox for relevant manifest
130
+
make all # build for prod and make extension.${browser}.zip
131
+
make tune2chrome # or tune2firefox for relevant manifest.json file
128
132
make dev # local development
129
133
```
130
134
131
135
### Protection
132
136
133
137
- 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...
138
+
- Well, tests on chrome show that even `Content-Security-Policy: default-src 'none';` header won't prevent injection of extension content-scripts...
135
139
- Avoid assigning to `window` or `globalThis` any application object.
136
140
See also [accidental global variables and memory leaks](https://www.tutorialspoint.com/explain-in-detail-about-memory-leaks-in-javascript).
137
141
- In general, you can incapacitate console functions:
0 commit comments