mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-21 18:02:34 +01:00
Minor code review
This commit is contained in:
parent
442331136c
commit
51edb13a06
@ -51,14 +51,13 @@ export function spoofCSS(
|
|||||||
const privatePropToValueMap = new Map();
|
const privatePropToValueMap = new Map();
|
||||||
for ( let i = 0; i < args.length; i += 2 ) {
|
for ( let i = 0; i < args.length; i += 2 ) {
|
||||||
const prop = toCamelCase(args[i+0]);
|
const prop = toCamelCase(args[i+0]);
|
||||||
if ( typeof prop !== 'string' ) { break; }
|
|
||||||
if ( prop === '' ) { break; }
|
if ( prop === '' ) { break; }
|
||||||
const value = args[i+1];
|
const value = args[i+1];
|
||||||
if ( typeof value !== 'string' ) { break; }
|
if ( typeof value !== 'string' ) { break; }
|
||||||
if ( prop.charCodeAt(0) === 0x5F /* _ */ ) {
|
if ( prop.charCodeAt(0) === 0x5F /* _ */ ) {
|
||||||
privatePropToValueMap.set(prop, value);
|
privatePropToValueMap.set(prop, value);
|
||||||
} else {
|
} else {
|
||||||
propToValueMap.set(toCamelCase(prop), value);
|
propToValueMap.set(prop, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const safe = safeSelf();
|
const safe = safeSelf();
|
||||||
|
Loading…
Reference in New Issue
Block a user