resolve #1 add ignore and block strategy for privacy purpose
This commit is contained in:
@@ -291,6 +291,7 @@ const HOOK_PROPERTIES: Array<[HTMLElement, string]> = [
|
||||
[HTMLSelectElement.prototype, 'value'],
|
||||
[HTMLTextAreaElement.prototype, 'value'],
|
||||
];
|
||||
const IGNORE_CLASS = 'rr-ignore';
|
||||
const lastInputValueMap: WeakMap<EventTarget, inputValue> = new WeakMap();
|
||||
function initInputObserver(cb: inputCallback): listenerHandler {
|
||||
function eventHandler(event: Event) {
|
||||
@@ -303,6 +304,12 @@ function initInputObserver(cb: inputCallback): listenerHandler {
|
||||
return;
|
||||
}
|
||||
const type: string | undefined = (target as HTMLInputElement).type;
|
||||
if (
|
||||
type === 'password' ||
|
||||
(target as HTMLElement).classList.contains(IGNORE_CLASS)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const text = (target as HTMLInputElement).value;
|
||||
let isChecked = false;
|
||||
if (type === 'radio' || type === 'checkbox') {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const rules: string[] = [
|
||||
'iframe { background: #ccc }',
|
||||
'iframe, .rr-block { background: #ccc }',
|
||||
'noscript { display: none !important; }',
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user