@affogatosoftware/recorder 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -28
- package/dist/browser/recorder.iife.js +9 -22
- package/dist/recorder/eventRecorder.d.ts +1 -1
- package/package.json +8 -3
- package/dist/browser/recorder.es.js +0 -6136
package/README.md
CHANGED
|
@@ -1,41 +1,23 @@
|
|
|
1
1
|
### Quick Start:
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
#### In your js/ts code:
|
|
6
|
-
```aiignore
|
|
7
|
-
import { Recorder } from '@affogatosoftware/recorder';
|
|
8
|
-
...
|
|
9
|
-
const rec = new Recorder(window, 'YOUR_API_TOKEN', { MaskingLevel.InputPasswordOrEmailAndTextArea });
|
|
10
|
-
rec.start();
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
#### Put this script tag at the end of the header tag in your index.html:
|
|
14
|
-
```aiignore
|
|
15
|
-
<script type="module">
|
|
16
|
-
import 'https://unpkg.com/@affogatosoftware/recorder/dist/browser/recorder.es.js';
|
|
17
|
-
const rec = new Recorder(window, 'YOUR_API_TOKEN', { MaskingLevel.InputPasswordOrEmailAndTextArea });
|
|
18
|
-
rec.start();
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
#### Or if module scripts don't work for you, do it this way:
|
|
3
|
+
Put this script tag at the end of the header tag in your index.html:
|
|
24
4
|
```aiignore
|
|
25
5
|
<script src="https://unpkg.com/@affogatosoftware/recorder/dist/browser/recorder.iife.js"></script>
|
|
26
6
|
<script>
|
|
27
|
-
|
|
28
|
-
rec.start();
|
|
7
|
+
(new window.scryspell.Recorder(window, 'YOUR_API_TOKEN', { maskingLevel: "all" })).start();
|
|
29
8
|
</script>
|
|
30
9
|
```
|
|
10
|
+
**Don't forget to replace 'YOUR_API_TOKEN' with your actual api token.**
|
|
31
11
|
|
|
32
12
|
### Masking Options
|
|
33
13
|
The masking level that gets passed in when the Recorder object is created will dictate what elements will turn their text into an asterisks (*).
|
|
34
14
|
This can be passed in using the MaskingLevel enum (ex. MaskingLevel.InputAndTextArea) or as a string ("InputAndTextArea").
|
|
35
15
|
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
16
|
+
* none: Nothing will get masked. Everything will be recorded and stored. **Make sure you have the user's permission to store potential PII.**
|
|
17
|
+
* all: All text will be masked. You won't need to show your users a cookie banner.
|
|
18
|
+
* input-and-text-area: All input and text area tags will have their text masked. If sensitive information is displayed as plain text outside of those 2 html tags, you'll need a cookie banner.
|
|
19
|
+
* input-password-or-email-and-text-area: All input tags of type password and email will have their text masked. All text area tags will ahve their text masked. If sensitive information is displayed as plain text outside of those 2 html tags, you'll need a cookie banner.
|
|
20
|
+
|
|
21
|
+
### Masking specific html elements
|
|
40
22
|
|
|
41
|
-
|
|
23
|
+
To mask all text in specific html elements (and their children) add the css class **scry-block**.
|