mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
Fix spoof-css for Firefox
This commit is contained in:
parent
005a0fe95d
commit
796ebc2444
@ -2261,6 +2261,11 @@ function spoofCSS(
|
|||||||
const proxiedStyle = new Proxy(style, {
|
const proxiedStyle = new Proxy(style, {
|
||||||
get(target, prop, receiver) {
|
get(target, prop, receiver) {
|
||||||
if ( typeof target[prop] === 'function' ) {
|
if ( typeof target[prop] === 'function' ) {
|
||||||
|
if ( prop === 'getPropertyValue' ) {
|
||||||
|
return (function(prop) {
|
||||||
|
return spoofStyle(prop, target[prop]);
|
||||||
|
}).bind(target);
|
||||||
|
}
|
||||||
return target[prop].bind(target);
|
return target[prop].bind(target);
|
||||||
}
|
}
|
||||||
return spoofStyle(prop, Reflect.get(target, prop, receiver));
|
return spoofStyle(prop, Reflect.get(target, prop, receiver));
|
||||||
|
Loading…
Reference in New Issue
Block a user